diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-04-14 23:15:44 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2015-04-14 23:15:44 +0200 |
commit | c183abb413310d1d4e6ed83e2f4d0ac71e91a5e6 (patch) | |
tree | 9760a46ceaec15e407bca0d704a91119f90a1ebb /zsh | |
parent | ab868abb2f638ef553b1289402d33aa37ef0c832 (diff) | |
download | dotfiles-c183abb413310d1d4e6ed83e2f4d0ac71e91a5e6.tar.xz |
zsh/prompt: Redo prompt colors, per-host colors
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/prompt.zsh | 69 |
1 files changed, 44 insertions, 25 deletions
diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 0ae4e0e..09f505e 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -1,27 +1,46 @@ -function red - printf "%s%s%s" "%F{red}" "$@" "%f" -function redbg - printf "%s%s%s" "%K{red}" "$@" "%k" -function redbg_p - printf "%s%s%s" "%K{red}" "$@" "%k" - -function bluebg_p - printf "%s%s%s" "%K{blue}" "$@" "%k%F{blue}%f" - -function black - printf "%s%s%s" "%F{black}" "$@" "%f" -function blackbg - printf "%s%s%s" "%K{black}" "$@" "%k" - -function white - printf "%s%s%s" "%F{white}" "$@" "%f" -function whitebg - printf "%s%s%s" "%K{white}" "$@" "%k" - -if [[ $UID -ne 0 ]]; then - PROMPT='$(blackbg " $(white %m) ")$(whitebg "$(black " %~") ") -%(?.$(bluebg_p "%B ^_^ %b").$(redbg_p "%B o_O %b")) ' +bg[light_pink]='%K{001}' +bg[light_red]='%K{196}' +bg[red]='%K{88}' +bg[dark_red]='%K{52}' + +fg[light_pink]='%F{001}' +fg[light_red]='%F{196}' +fg[red]='%F{88}' +fg[dark_red]='%F{52}' + + +bg[light_gold]='%K{136}' +bg[gold]='%K{139}' +bg[dark_gold]='%K{94}' + +fg[light_gold]='%F{136}' +fg[gold]='%F{139}' +fg[dark_gold]='%F{94}' + + +bg[light_blue]='%K{blue}' +bg[blue]='%K{21}' + +fg[light_blue]='%F{blue}' +fg[blue]='%F{21}' + + +if (( UID == 0 )); then + PROMPT='$bg[light_red] $fg[white]%m%f %k$bg[white]$fg[light_red] %~ %f%k +$bg[light_blue]%B ^_^ %b%k ' + else - PROMPT='$(redbg " $(white %m) ")$(whitebg "$(red " %~") ") -%(?.$(bluebg_p "%B ^_^ %b").$(redbg_p "%B o_O %b")) ' + if [[ $HOST == "leeloo.kyriasis.com" ]]; then + PROMPT='$bg[black] $fg[white]%m%f %k$bg[white]$fg[black] %~ %f%k +$bg[light_blue]%B ^_^ %b %k' + + elif [[ $HOST == "theos.kyriasis.com" ]]; then + PROMPT='$bg[light_pink] $fg[white]%m%f %k$bg[white]$fg[light_pink] %~ %f%k +$bg[light_blue]%B ^_^ %b %k' + + elif [[ $HOST == "lucifer.kyriasis.com" ]]; then + PROMPT='$bg[dark_gold] $fg[white]%m%f %k$bg[white]$fg[dark_gold] %~ %f%k +$bg[light_blue]%B ^_^ %b %k' + + fi fi |