From 3a7e3d21e25efe37f49fab4cdf611078caec930d Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Wed, 1 Nov 2023 17:58:22 +0100 Subject: [PATCH] prompt, that shows hostname on hosts other than main --- programs/bash.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/programs/bash.nix b/programs/bash.nix index 37ecac5..f2fd017 100644 --- a/programs/bash.nix +++ b/programs/bash.nix @@ -73,7 +73,12 @@ export TERM="xterm-color" # my prompt - export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ " + if [[ "$(hostname)" == "main" ]] + then + export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ " + else + export PS1="\033[1;32m$(hostname)❯ \[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ " + fi # so that programms i spawn from my shell don't have so high cpu priority