thisnthat.zsh-theme 733 B

1234567891011121314151617181920
  1. # Add a blank line before the promp
  2. precmd() { print "" }
  3. # Change user color if elevated permissions
  4. if [[ $UID == 0 || $EUID == 0 ]]; then
  5. # root
  6. USER_COLOR="red"
  7. else
  8. USER_COLOR="green"
  9. fi
  10. # Set the prompt
  11. #PROMPT="%{$fg[$USER_COLOR]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%} $(git_prompt_info)"$'\n'"%{$fg[$USER_COLOR]%}>%{$reset_color%} "
  12. PROMPT='%{$fg[$USER_COLOR]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)'$'\n''%{$fg[$USER_COLOR]%}>%{$reset_color%} '
  13. # git prompt data
  14. ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
  15. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  16. ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗"
  17. ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green] ✔"