-
Notifications
You must be signed in to change notification settings - Fork 0
/
randomPlus.zsh-theme
60 lines (44 loc) · 1.68 KB
/
randomPlus.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
59
60
###################
# BUILDING PROMPT #
###################
# Main prompt (left)
PROMPT='$(check_git_prompt_info)$(nvm_prompt_info) | $fg[cyan]%n $fg[white]on $fg[blue]%m $fg[white]in $fg[magenta]%~%b
$(random_emoji) $_SYMBOL'
# Main prompt (right)
RPROMPT=''
##################
# GATHERING BITS #
##################
# Get more options here: http://getemoji.com/
EMOJI=(👽 💀 🐦 🐷 🐻 🐼 🐨 🐯 🦁 🐮 🐶 🐸 🐧 🐳 🐌 🐓 🐢 🐍 🦄 🐙 🐠 🐘 🌍 🍄 🌻 👻 ⛄️ 🍭 🍌 🍍 ⛱ 📓 📚 📖 🎈 🖌 🖍 ✏️ 🎨 💬 💭 🗯 💩 🚀 ⛵️ 😎 😜 😝)
function random_emoji {
echo -n "$EMOJI[$RANDOM%$#EMOJI+1] "
}
# Prompt symbols
_SYMBOL="%{$fg[red]%}>%{$fg[yellow]%}>%{$fg[cyan]%}> "
######################
# Git Prompt Builder #
######################
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} | "
# Text to display if the branch is dirty
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*"
# Text to display if the branch is clean
ZSH_THEME_GIT_PROMPT_CLEAN=""
# Git sometimes goes into a detached head state. git_prompt_info doesn't
# return anything in this case. So wrap it in another function and check
# for an empty string.
function check_git_prompt_info() {
if git rev-parse --git-dir > /dev/null 2>&1; then
if [[ -z $(git_prompt_info) ]]; then
echo "%{$fg[magenta]%}detached-head%{$reset_color%})"
else
echo "$(git_prompt_info)"
fi
fi
}
######################
# NVM Prompt Builder #
######################
ZSH_THEME_NVM_PROMPT_PREFIX="%{$fg[green]%}⬡ "
ZSH_THEME_NVM_PROMPT_SUFFIX="%{$fg[white]%}"ami