diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish index bc82b02..f1a9c69 100644 --- a/config/fish/functions/fish_prompt.fish +++ b/config/fish/functions/fish_prompt.fish @@ -23,20 +23,25 @@ set __prompt_bg 35373b function fish_prompt echo - set_color -o $fish_color_cwd -b $__prompt_bg - echo -n $PWD | sed -e "s,^$HOME,~," - set_color normal -b $__prompt_bg + if [ (id -u) -eq "0" ] + set_color -o red -b $__prompt_bg + else + set_color -o green -b $__prompt_bg + end - printf '%s\e[K\n' (__fish_git_prompt | sed -r 's/(\x1B\[0?)m/\139m/') + echo -n $PWD | sed -e "s,^$HOME,~," + set_color normal -b $__prompt_bg + + printf '%s\e[K\n' (__fish_git_prompt | sed -r 's/(\x1B\[0?)m/\139m/') if [ (id -u) -eq "0" ] set_color red echo -n "# " else if [ "$USER" = "sijmen" ] - set_color blue + set_color green else - set_color yellow + set_color blue end echo -n "\$ " end @@ -46,7 +51,7 @@ function fish_prompt set_color normal echo -n " " - z --add "$PWD" + z --add "$PWD" end