candy-kingdom.zsh-theme 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # neuralsanwich.zsh-theme
  2. #
  3. # Author: Sean Jones
  4. # URL: http://www.neuralsandwich.com
  5. # Repo:
  6. # Direct link:
  7. # Create:
  8. # Modified:
  9. if [ "x$OH_MY_ZSH_HG" = "x" ]; then
  10. OH_MY_ZSH_HG="hg"
  11. fi
  12. function hg_prompt_info {
  13. $OH_MY_ZSH_HG prompt --angle-brackets "\
  14. < on %{$fg[magenta]%}<branch>%{$reset_color%}>\
  15. < at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
  16. %{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
  17. patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
  18. }
  19. function box_name {
  20. [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
  21. }
  22. PROMPT='
  23. %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
  24. %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
  25. ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: "
  26. ZSH_THEME_GIT_PROMPT_CLEAN=""
  27. ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}?"
  28. ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[orange]%}!"
  29. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
  30. local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
  31. RPROMPT='${return_status}$(battery_time_remaining) $(battery_pct_prompt)%{$reset_color%}'