-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzodiac.zsh-theme
58 lines (54 loc) · 1.6 KB
/
zodiac.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
54
55
56
57
58
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_HG_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_HG_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
vcs_status() {
if [[ $(whence in_svn) != "" ]] && in_svn; then
svn_prompt_info
elif [[ $(whence in_hg) != "" ]] && in_hg; then
hg_prompt_info
else
git_prompt_info
fi
}
zodiac() {
year=$(date +%Y)
let "cycle = $year - 1983"
let "lny = $cycle % 12"
if [ $lny -eq 1 ]; then
echo "🐭"
elif [ $lny -eq 2 ]; then
echo "🐮"
elif [ $lny -eq 3 ]; then
echo "🐯"
elif [ $lny -eq 4 ]; then
echo "🐰"
elif [ $lny -eq 5 ]; then
echo "🐲"
elif [ $lny -eq 6 ]; then
echo "🐍"
elif [ $lny -eq 7 ]; then
echo "🐴"
elif [ $lny -eq 8 ]; then
echo "🐏"
elif [ $lny -eq 9 ]; then
echo "🐵"
elif [ $lny -eq 10 ]; then
echo "🐔"
elif [ $lny -eq 11 ]; then
echo "🐶"
elif [ $lny -eq 0 ]; then
echo "🐷"
else
echo "🐼"
fi
}
PROMPT='$(zodiac) %F{green}%2/%f $(vcs_status)$ '