diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-24 00:50:24 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-24 00:50:24 +1300 |
commit | 4df48817fc379f72256e86518707acab1f0c1ba6 (patch) | |
tree | 424882ee4781062aeae473ea96f91abcc88ad114 /bash | |
parent | Add xterm-256color definition. (diff) | |
download | dotfiles-4df48817fc379f72256e86518707acab1f0c1ba6.tar.gz dotfiles-4df48817fc379f72256e86518707acab1f0c1ba6.zip |
Set titles for xterm/screen/tmux.
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc index ffc5039d..57d6719d 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -69,3 +69,18 @@ if [ $? -eq 0 ]; then export EDITOR=vi fi +# Terminal-specific settings. +case "$TERM" in + + # Set title of screen/tmux window. + screen*) + printf "\033k$(hostname)\033\\" + ;; + + # Set xterm title, use 256 colors. + xterm*) + PS1="\[\e]0;\h\a\]${PS1}" + TERM=xterm-256color + ;; +esac + |