From 4df48817fc379f72256e86518707acab1f0c1ba6 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 24 Feb 2012 00:50:24 +1300 Subject: Set titles for xterm/screen/tmux. --- bash/bashrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 + -- cgit v1.2.3