af-magic.zsh-theme 986 B

123456789101112131415161718192021222324252627282930313233
  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]------------------------------------------------------------%{$reset_color%}
  8. $FG[032]%~\
  9. $(git_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='$(virtualenv_prompt_info)$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%}"