From 322045bcdee54b33a03303ed161784e6beae35f8 Mon Sep 17 00:00:00 2001 From: illuminatis Date: Mon, 3 Dec 2012 11:20:06 +0100 Subject: [PATCH] added red background color for root I use oh-my-zsh with powerline theme for normal user and root and when background color is the same in both cases it could be misleading. I know, that red background is used for ssh connections, but we can talk about it. --- powerline.zsh-theme | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/powerline.zsh-theme b/powerline.zsh-theme index 8c644c6..0cbe8ab 100644 --- a/powerline.zsh-theme +++ b/powerline.zsh-theme @@ -45,8 +45,13 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%F{220]➜%f" ZSH_THEME_GIT_PROMPT_UNMERGED="%F{082]═%f" ZSH_THEME_GIT_PROMPT_UNTRACKED="%F{190]✭%f" -POWERLINE_SEC1_BG=%K{green} -POWERLINE_SEC1_FG=%F{green} +if [ $(id -u) -eq 0 ]; then + POWERLINE_SEC1_BG=%K{red} + POWERLINE_SEC1_FG=%F{red} +else + POWERLINE_SEC1_BG=%K{green} + POWERLINE_SEC1_FG=%F{green} +fi POWERLINE_SEC1_TXT=%F{black} if [ "$POWERLINE_DETECT_SSH" != "" ]; then if [ -n "$SSH_CLIENT" ]; then