-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbrandor.zsh-theme
52 lines (39 loc) · 937 Bytes
/
brandor.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
#
# brandor.zsh-theme
#
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
#
# color vars
#
eval my_gray='$FG[237]'
eval my_orange='$FG[214]'
# Load version control info
autoload -Uz vcs_info
precmd() { vcs_info }
setopt prompt_subst
git_branch_name() {
if [ -d .git ]; then
ref=$(git symbolic-ref HEAD | cut -d'/' -f3-);
echo $ref;
fi;
}
git_prompt() {
if [ -z $(git_branch_name) ]
then
echo '-['$FG[050]$(git_branch_name)$FG[001]']'
fi
}
#
# BrandoR's prompt
#
PROMPT='
$FG[001]┌──[$FG[032]%~$FG[001]]-[$FG[050]$(git_branch_name)$FG[001]]
$FG[001]└──> $FG[002] ༼ つ ◕_◕ ༽つ\$$reset_color '
#
# Git settings
#
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075]($FG[078]"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"