From 6ac82ab440e7bf0799170baf0e4da61001a7ce23 Mon Sep 17 00:00:00 2001 From: pztrn Date: Tue, 2 Dec 2014 21:13:26 +0500 Subject: [PATCH] Root user highlight for pztrn theme. --- zsh/prompts/pztrn.zsh-theme | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zsh/prompts/pztrn.zsh-theme b/zsh/prompts/pztrn.zsh-theme index 36b155f..49ac890 100644 --- a/zsh/prompts/pztrn.zsh-theme +++ b/zsh/prompts/pztrn.zsh-theme @@ -38,7 +38,13 @@ prompt_pztrn_setup () { [[ -n "$WINDOW" ]] && p_win="$pc['\(']%F{$pcc[4]}$WINDOW$pc['\)']" - p_userpwd="$pc['\[']%F{$pcc[5]}User:%F{$pcc[3]} %n$pc['\]']$pc['\[']%F{$pcc[5]}Host:%F{$pcc[3]} %M$pc['\]']" + if [[ $USER == "root" ]]; then + pc['usercolor']="%F{$pcc[1]}" + else + pc['usercolor']="%F{$pcc[3]}" + fi + + p_userpwd="$pc['\[']%F{$pcc[5]}User:$pc['usercolor'] %n$pc['\]']$pc['\[']%F{$pcc[5]}Host:%F{$pcc[3]} %M$pc['\]']" p_shlvlhist="$pc['\[']%F{$pcc[3]}%B%h%b$pc['\]']" p_rc="%(?..[%?%1v] )"