thisnthat.zsh-theme 1010 B

12345678910111213141516171819202122232425262728
  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. FQDN=`hostname -f`
  11. # Set the prompt
  12. #PROMPT="%{$fg[$USER_COLOR]%}%n@%M%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%} $(git_prompt_info)"$'\n'"%{$fg[$USER_COLOR]%}>%{$reset_color%} "
  13. #PROMPT='%{$fg[$USER_COLOR]%}%n@${FQDN}%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)'$'\n''%{$fg[$USER_COLOR]%}>%{$reset_color%} '
  14. HOST_NAME="%{$fg[$USER_COLOR]%}%n@${FQDN}%{$reset_color%}"
  15. LOCATION="%{$fg_bold[blue]%}%~%{$reset_color%}"
  16. LINE_PROMPT="%{$fg[$USER_COLOR]%}>%{$reset_color%} "
  17. NEWLINE=$'\n'
  18. PROMPT='${HOST_NAME} ${LOCATION} $(git_prompt_info) ${NEWLINE}${LINE_PROMPT}'
  19. # git prompt data
  20. ZSH_THEME_GIT_PROMPT_PREFIX="on %{$fg[magenta]%}"
  21. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  22. ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗"
  23. ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green] ✔"