my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
979 B

3 years ago
  1. # https://github.com/blinks zsh theme
  2. function _prompt_char() {
  3. if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
  4. echo "%{%F{blue}%}±%{%f%k%b%}"
  5. else
  6. echo ' '
  7. fi
  8. }
  9. # This theme works with both the "dark" and "light" variants of the
  10. # Solarized color schema. Set the SOLARIZED_THEME variable to one of
  11. # these two values to choose. If you don't specify, we'll assume you're
  12. # using the "dark" variant.
  13. case ${SOLARIZED_THEME:-dark} in
  14. light) bkg=white;;
  15. *) bkg=black;;
  16. esac
  17. ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
  18. ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]"
  19. ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
  20. ZSH_THEME_GIT_PROMPT_CLEAN=""
  21. PROMPT='%{%f%k%b%}
  22. %{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
  23. %{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '
  24. RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'