summaryrefslogtreecommitdiff
path: root/zsh/custom/themes/mediocregopher.zsh-theme
blob: 529f46b5fd10c67a2a8a8a1612b4329bc56c05e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env zsh

# Unique string based on hostname
sha1=$(echo $(hostname) | sha1sum | awk '{print $1}' | grep -oP '[0-9a-f]{8}' | head -n1)
# Turn sha1 into int
asint=$(printf "%d" 0x$sha1)

colorint=$(printf "%03d" $(expr $asint % 255))
color=$FG[$colorint]

PROMPT='%{$color%} %~%{$reset_color%}$(git_prompt_info)$(git_prompt_status)%{$reset_color%} :: '

ZSH_THEME_GIT_PROMPT_PREFIX=" ::%{$fg[green]%} "
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""

ZSH_THEME_GIT_PROMPT_ADDED=" +"
ZSH_THEME_GIT_PROMPT_MODIFIED=" ^"
ZSH_THEME_GIT_PROMPT_DELETED=" -"
ZSH_THEME_GIT_PROMPT_RENAMED=" >"
ZSH_THEME_GIT_PROMPT_UNMERGED=" @"
ZSH_THEME_GIT_PROMPT_UNTRACKED=" *"