fino-time.zsh-theme 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # fino-time.zsh-theme
  2. # Use with a dark background and 256-color terminal!
  3. # Meant for people with RVM and git. Tested only on OS X 10.7.
  4. # You can set your computer name in the ~/.box-name file if you want.
  5. # Borrowing shamelessly from these oh-my-zsh themes:
  6. # bira
  7. # robbyrussell
  8. #
  9. # Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
  10. function virtualenv_info {
  11. [ $CONDA_DEFAULT_ENV ] && echo "($CONDA_DEFAULT_ENV) "
  12. [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
  13. }
  14. function prompt_char {
  15. git branch >/dev/null 2>/dev/null && echo '⠠⠵' && return
  16. echo '○'
  17. }
  18. function box_name {
  19. local box="${SHORT_HOST:-$HOST}"
  20. [[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
  21. echo "${box:gs/%/%%}"
  22. }
  23. PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}\$(git_prompt_info)\$(ruby_prompt_info) %D - %*
  24. ╰─\$(virtualenv_info)\$(prompt_char) "
  25. ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
  26. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  27. ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
  28. ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
  29. ZSH_THEME_RUBY_PROMPT_PREFIX=" %{$FG[239]%}using%{$FG[243]%} ‹"
  30. ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"