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
commitaf8f4a71ec774899686250449c27508d7957eed2 (patch)
tree9f17b1224e7b174914bde740b0ad7d3eb97b0183
parenteb9d5f56838c8ae1f991219420d1bd703f5db826 (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\] "
+ '';
}