ys.zsh-theme 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Clean, simple, compatible and meaningful.
  2. # Tested on Linux, Unix and Windows under ANSI colors.
  3. # It is recommended to use with a dark background and the font Inconsolata.
  4. # Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
  5. #
  6. # http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
  7. # Mar 2013 ys
  8. # Machine name.
  9. function box_name {
  10. [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
  11. }
  12. # Directory info.
  13. local current_dir='${PWD/#$HOME/~}'
  14. # Git info.
  15. local git_info='$(git_prompt_info)'
  16. ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}"
  17. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  18. ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x"
  19. ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o"
  20. # Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $
  21. PROMPT="
  22. %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
  23. %{$fg[cyan]%}%n \
  24. %{$fg[white]%}at \
  25. %{$fg[green]%}$(box_name) \
  26. %{$fg[white]%}in \
  27. %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
  28. ${git_info} \
  29. %{$fg[white]%}[%*]
  30. %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"