fino.zsh-theme 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Fino theme by Max Masnick (http://max.masnick.me)
  2. # Use with a dark background and 256-color terminal!
  3. # Meant for people with rbenv 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 prompt_char {
  11. git branch >/dev/null 2>/dev/null && echo "±" && return
  12. echo '○'
  13. }
  14. function box_name {
  15. [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
  16. }
  17. local ruby_env=''
  18. if which rvm-prompt &> /dev/null; then
  19. ruby_env=' ‹$(rvm-prompt i v g)›%{$reset_color%}'
  20. else
  21. if which rbenv &> /dev/null; then
  22. ruby_env=' ‹$(rbenv version-name)›%{$reset_color%}'
  23. fi
  24. fi
  25. local current_dir='${PWD/#$HOME/~}'
  26. local git_info='$(git_prompt_info)'
  27. local prompt_char='$(prompt_char)'
  28. 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]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env}
  29. ╰─${prompt_char} "
  30. ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
  31. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  32. ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
  33. ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"