michelebologna.zsh-theme 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # reference colors
  2. GREEN="%{$fg_bold[green]%}"
  3. RED="%{$fg_bold[red]%}"
  4. CYAN="%{$fg_bold[cyan]%}"
  5. YELLOW="%{$fg_bold[yellow]%}"
  6. BLUE="%{$fg_bold[blue]%}"
  7. MAGENTA="%{$fg_bold[magenta]%}"
  8. WHITE="%{$fg_bold[white]%}"
  9. COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
  10. # color reset
  11. RESET_COLOR="%{$reset_color%}"
  12. # which color should be applied?
  13. USERNAME_NORMAL_COLOR=$WHITE
  14. USERNAME_ROOT_COLOR=$RED
  15. HOSTNAME_NORMAL_COLOR=$BLUE
  16. # uncomment next line if you want auto-generated hostname color
  17. #for i in `hostname`; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
  18. HOSTNAME_ROOT_COLOR=$RED
  19. HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
  20. CURRENT_DIR_COLOR=$CYAN
  21. # zsh commands
  22. USERNAME_COMMAND="%n"
  23. HOSTNAME_COMMAND="%m"
  24. CURRENT_DIR="%~"
  25. # output: colors + commands
  26. USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
  27. HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
  28. CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
  29. LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
  30. # git theming
  31. ZSH_THEME_GIT_PROMPT_PREFIX="("
  32. ZSH_THEME_GIT_PROMPT_SUFFIX=""
  33. ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
  34. ZSH_THEME_GIT_PROMPT_CLEAN=")"
  35. # wrap all together
  36. PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR '
  37. RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]'