From: W. Trevor King Date: Thu, 1 Dec 2011 12:06:26 +0000 (-0500) Subject: Add X-terminal title setting with .bashrc.d/70title from Gentoo's /etc/bash/bashrc. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d3154460288eb0dafb5b1ef3b24afae35896a1e;p=dotfiles-public.git Add X-terminal title setting with .bashrc.d/70title from Gentoo's /etc/bash/bashrc. --- diff --git a/src/.bashrc.d/70title b/src/.bashrc.d/70title new file mode 100644 index 0000000..b6f5814 --- /dev/null +++ b/src/.bashrc.d/70title @@ -0,0 +1,11 @@ +if [ "${OS}" != 'Gentoo' ] && [ "${OS}" != 'Gentoo Prefix' ]; then + # Change the window title of X terminals + case ${TERM} in + xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"' + ;; + screen) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"' + ;; + esac +fi