-
Notifications
You must be signed in to change notification settings - Fork 0
/
zvv.zsh-theme
53 lines (47 loc) · 1.42 KB
/
zvv.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# zvv
# Colors
local blue=$fg[blue]
local cyan=$fg[cyan]
local green=$fg[green]
local red=$fg[red]
local white=$fg[white]
local yellow=$fg[yellow]
local bblue=$fg_bold[blue]
local bcyan=$fg_bold[cyan]
local bgreen=$fg_bold[green]
local bred=$fg_bold[red]
local bwhite=$fg_bold[white]
local byellow=$fg_bold[yellow]
local bmagenta=$fg_bold[magenta]
local bgred=$bg[red]
# Git info
ZSH_THEME_GIT_PROMPT_PREFIX="%{$bcyan%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$bgreen%} ✔︎"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$bred%} ✘"
# Git status
ZSH_THEME_GIT_PROMPT_ADDED="%{$bgreen%}+"
ZSH_THEME_GIT_PROMPT_DELETED="%{$bred%}-"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$bmagenta%}✱"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$bblue%}>"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$bcyan%}="
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$byellow%}?"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$bred%}^"
# Git SHA
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$yellow%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
function git_info() {
if [[ -n $(git_prompt_info) ]]; then
echo "$indicator_color❮ \
$(git_prompt_short_sha) \
$(git_prompt_info) \
$(git_prompt_status) "
fi
}
local indicator_color="%(?,%{$bcyan%},%{$bred%})"
local exit_code="%(?,, %{$bgred%}%{$bwhite%}%?%{$reset_color%})"
PROMPT='$indicator_color❮%{$reset_color%} \
%{$bwhite%}%n%{$bred%}@%{$green%}$HOST%{$white%}: \
%{$byellow%}%~%{$reset_color%}$exit_code
$(git_info)\
$indicator_color❯%{$reset_color%} '