blinks.zsh-theme 979 B

123456789101112131415161718192021222324252627282930
  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%}'