From 279654d9e5c91413596c2328e6de4dc35d2c4dc5 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 8 Jan 2024 21:44:21 +0530 Subject: common: refactor bash prompt --- common.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common.nix b/common.nix index f550d7c..5483f63 100644 --- a/common.nix +++ b/common.nix @@ -94,9 +94,11 @@ in # programs programs.bash.promptInit = '' - PROMPT_COLOR="1;31m" - [ "$UID" -ne 0 ] && + if [ "$UID" -ne 0 ]; then PROMPT_COLOR="1;32m" + else + PROMPT_COLOR="1;31m" + fi PS1="\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] " ''; -- cgit v1.2.3