bira.zsh-theme 1.16 KB
Newer Older
Janosch Schwalm's avatar
Janosch Schwalm committed
1
# ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
2
3
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"

4
if [[ $UID -eq 0 ]]; then
5
    local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
Jocelyn Thode's avatar
Jocelyn Thode committed
6
    local user_symbol='#'
7
else
8
    local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
Jocelyn Thode's avatar
Jocelyn Thode committed
9
    local user_symbol='$'
10
11
fi

12
13
local current_dir='%{$terminfo[bold]$fg[blue]%}%~ %{$reset_color%}'
local git_branch='$(git_prompt_info)'
14
local rvm_ruby='$(ruby_prompt_info)'
15
local venv_prompt='$(virtualenv_prompt_info)'
16

17
18
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"

19
PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${git_branch}${venv_prompt}
Jocelyn Thode's avatar
Jocelyn Thode committed
20
╰─%B${user_symbol}%b "
21
RPROMPT="%B${return_code}%b"
22
23
24

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
Jocelyn Thode's avatar
Jocelyn Thode committed
25

26
27
28
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"

29
30
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
31
32
ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX