diff options
| author | Tom Harley | 2020-12-31 07:45:43 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-12-31 07:45:43 +0000 |
| commit | 18b5149daea03230be2f67c0db86a8b2a6a74f0e (patch) | |
| tree | 2edeb76f2080f06e43acff5d5e1b26902eeed56c /bash.nix | |
| parent | Put xmonad config in separate file (diff) | |
| download | home-manager-18b5149daea03230be2f67c0db86a8b2a6a74f0e.tar.gz home-manager-18b5149daea03230be2f67c0db86a8b2a6a74f0e.zip | |
Add terminal-title-setting code
Adds code based on
https://tldp.org/HOWTO/Bash-Prompt-HOWTO/xterm-title-bar-manipulations.html
to edit the terminal emulator’s window title each time PS1 is evaluated.
Diffstat (limited to 'bash.nix')
| -rw-r--r-- | bash.nix | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,10 +10,12 @@ }; initExtra = '' + TITLEBAR='\[\033]0;\u@\h:\w\007\]' + if [ -z $IN_NIX_SHELL ] ; then - export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]\$ " + export PS1="$TITLEBAR[\[\e[34m\]\u@\h \W\[\e[39m\]]\$ " else - export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]* " + export PS1="$TITLEBAR[\[\e[34m\]\u@\h \W\[\e[39m\]]* " fi export PS2="> " ''; |
