summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2023-07-04 17:07:26 +0530
committersinanmohd <pcmsinan@gmail.com>2023-07-04 17:07:26 +0530
commit657a7be914432e3629f06ab2cd0139906cf12a47 (patch)
tree9f17b1224e7b174914bde740b0ad7d3eb97b0183
parentc8c5542f8e7d536cb07562d1639ccc03aa0c3c1c (diff)
configuration: remove the newline from bash prompt
-rw-r--r--configuration.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix
index 54fca6d..2d9767a 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -68,4 +68,11 @@ in
];
};
system.stateVersion = "23.05";
+ programs.bash.promptInit = ''
+ PROMPT_COLOR="1;31m"
+ [ "$UID" -ne 0 ] &&
+ PROMPT_COLOR="1;32m"
+
+ PS1="\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] "
+ '';
}