From c183abb413310d1d4e6ed83e2f4d0ac71e91a5e6 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 14 Apr 2015 23:15:44 +0200 Subject: zsh/prompt: Redo prompt colors, per-host colors --- zsh/prompt.zsh | 69 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 25 deletions(-) (limited to 'zsh') 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 -- cgit v1.2.3-70-g09d2