bira.zsh-theme 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
  2. local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
  3. if [[ $UID -eq 0 ]]; then
  4. local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
  5. local user_symbol='#'
  6. else
  7. local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
  8. local user_symbol='$'
  9. fi
  10. local current_dir='%{$terminfo[bold]$fg[blue]%}%~ %{$reset_color%}'
  11. local git_branch='$(git_prompt_info)'
  12. local rvm_ruby='$(ruby_prompt_info)'
  13. local venv_prompt='$(virtualenv_prompt_info)'
  14. ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
  15. PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${git_branch}${venv_prompt}
  16. ╰─%B${user_symbol}%b "
  17. RPROMPT="%B${return_code}%b"
  18. ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
  19. ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
  20. ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
  21. ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
  22. ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
  23. ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
  24. ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
  25. ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX