Advertisement
Guest User

Rainbow_ZSH_theme

a guest
Mar 15th, 2021
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. # Put it into your ~/.oh-my-zsh/theme/ folder
  2. # Save as .zsh-theme file
  3.  
  4. local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
  5.  
  6. if [[ $UID -eq 0 ]]; then
  7. local user_host='%{$terminfo[bold]$fg[magenta]%}%n%{$terminfo[bold]$fg[magenta]%}@%m %{$reset_color%}'
  8. local user_symbol='#'
  9. else
  10. local user_host='%{$terminfo[bold]$fg[yellow]%}[%n%{$reset_color%}%{$fg[green]%}@%{$fg[blue]%}%m] -'
  11. local user_symbol='%{$fg[red]%}:3%{$reset_color%} %{$terminfo[bold]$fg[yellow]%}:3%{$reset_color%} %{$fg[green]%}<3%{$reset_color%} %{$fg[blue]%}:3%{$reset_color%} %{$fg[magenta]%}<3%{$reset_color%}'
  12. fi
  13.  
  14. local current_dir='%{$reset_color%} %{$terminfo[bold]$fg[magenta]%}[ %~ ]%{$reset_color%}'
  15. local git_branch='$(git_prompt_info)'
  16. local rvm_ruby='$(ruby_prompt_info)'
  17. local venv_prompt='$(virtualenv_prompt_info)'
  18.  
  19. ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
  20.  
  21. PROMPT="
  22. %{$fg[red]%}╭─%{$reset_color%}${user_host}${current_dir}${rvm_ruby}${git_branch}${venv_prompt}
  23. %{$fg[red]%}├─%{$reset_color%}%B${user_symbol}%b
  24. %{$fg[red]%}╰───%{$reset_color%}%{$terminfo[bold]$fg[yellow]%}: > "
  25. RPROMPT="%B${return_code}%b"
  26.  
  27. ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
  28. ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
  29.  
  30. ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
  31. ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
  32.  
  33. ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
  34. ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
  35. ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
  36. ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement