af-magic.zsh-theme 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # af-magic.zsh-theme
  2. # Repo: https://github.com/andyfleming/oh-my-zsh
  3. # Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
  4. if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
  5. local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
  6. # primary prompt
  7. PROMPT='$FG[237]${(l.COLUMNS..-.)}%{$reset_color%}
  8. $FG[032]%~\
  9. $(git_prompt_info)$(hg_prompt_info) \
  10. $FG[105]%(!.#.»)%{$reset_color%} '
  11. PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
  12. RPS1='${return_code}'
  13. # color vars
  14. eval my_gray='$FG[237]'
  15. eval my_orange='$FG[214]'
  16. # right prompt
  17. if type "virtualenv_prompt_info" > /dev/null
  18. then
  19. RPROMPT='$FG[078]$(virtualenv_prompt_info)%{$reset_color%} $my_gray%n@%m%{$reset_color%}%'
  20. else
  21. RPROMPT='$my_gray%n@%m%{$reset_color%}%'
  22. fi
  23. # git settings
  24. ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075]($FG[078]"
  25. ZSH_THEME_GIT_PROMPT_CLEAN=""
  26. ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
  27. ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
  28. # hg settings
  29. ZSH_THEME_HG_PROMPT_PREFIX="$FG[075]($FG[078]"
  30. ZSH_THEME_HG_PROMPT_CLEAN=""
  31. ZSH_THEME_HG_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
  32. ZSH_THEME_HG_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"