aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-02-24 00:50:24 +1300
committerTom Ryder <tom@sanctum.geek.nz>2012-02-24 00:50:24 +1300
commit4df48817fc379f72256e86518707acab1f0c1ba6 (patch)
tree424882ee4781062aeae473ea96f91abcc88ad114 /bash
parentAdd xterm-256color definition. (diff)
downloaddotfiles-4df48817fc379f72256e86518707acab1f0c1ba6.tar.gz
dotfiles-4df48817fc379f72256e86518707acab1f0c1ba6.zip
Set titles for xterm/screen/tmux.
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc15
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
+