-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmira.zsh-theme
34 lines (25 loc) · 1.07 KB
/
mira.zsh-theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Mira ZSH Theme - A modified Bira with time info and a simplified start prompt
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
local user_symbol='$'
fi
if [ -z $SSH_CONNECTION ]; then
local ssh_indicator="$terminfo[bold]$fg[green][LOCAL]$reset_color"
else
local ssh_indicator="$terminfo[bold]$fg[red][ SSH]$reset_color"
fi
local current_dir='%{$terminfo[bold]$fg[blue]%}%~ %{$reset_color%}'
# hg_prompt_info requires this plugin:
# https://github.com/iarkhanhelsky/oh-my-zsh-hg-prompt
local vcs_branch='$(git_prompt_info)$(hg_prompt_info)'
local time_info='%{$fg[green]%}[%D{%H:%M}]%f'
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
PROMPT="${ssh_indicator} ${user_host}${current_dir}${vcs_branch}
%B${time_info}%b %B${user_symbol}%b "
RPROMPT="%B${return_code}%b"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"