summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-01-17 15:14:13 +0100
committerlassulus <lass@lassul.us>2017-01-17 15:45:15 +0100
commit670ec1e19f18072fc660417c02bbf2b96a7d3b28 (patch)
tree107696e29a0f81fbe536e74aa5831a87af45dffc
parent9be93e7ac0a1f385d80452e7d2565ffe343af8dc (diff)
l 2: set window title for bash
-rw-r--r--lass/2configs/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix
index 1cb68a985..24f3bd2da 100644
--- a/lass/2configs/default.nix
+++ b/lass/2configs/default.nix
@@ -162,13 +162,17 @@ with import <stockholm/lib>;
promptInit = ''
if test $UID = 0; then
PS1='\[\033[1;31m\]\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$USER@$PWD\007"'
elif test $UID = 1337; then
PS1='\[\033[1;32m\]\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$PWD\007"'
else
PS1='\[\033[1;33m\]\u@\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$USER@$PWD\007"'
fi
if test -n "$SSH_CLIENT"; then
PS1='\[\033[35m\]\h'" $PS1"
+ PROMPT_COMMAND='echo -ne "\033]0;$HOSTNAME $USER@$PWD\007"'
fi
'';
};