summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2012-07-13 15:35:01 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2012-07-13 15:35:01 +0200
commit7cf492945368ecaf37815744f4cc756aac455c31 (patch)
tree11f9bdf3ec31211f537fce4f075f24570876ab27
parent6a257631a949785616c3fbc31675b09c785c6c68 (diff)
downloaddotfiles-7cf492945368ecaf37815744f4cc756aac455c31.tar.gz
dotfiles-7cf492945368ecaf37815744f4cc756aac455c31.tar.xz
dotfiles-7cf492945368ecaf37815744f4cc756aac455c31.zip
/bashrc/common/prompt: set terminal title
if detected a valid terminal (xterm or a rxvt variant) set the icon name and title (better distinction of different terminals)
-rw-r--r--bashrc/common/prompt.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/bashrc/common/prompt.sh b/bashrc/common/prompt.sh
index 00e95b6..69ad443 100644
--- a/bashrc/common/prompt.sh
+++ b/bashrc/common/prompt.sh
@@ -112,6 +112,10 @@ __make_prompt() {
if [[ -n "${TMUX}" || -n "${TMUX}" ]]; then
echo -ne "\ek$(id -un)@${_hostname%%\.*}\e\\"
fi
+
+ if [[ "${TERM#rxvt}" != "${TERM}" || "${TERM#xterm}" != "${TERM}" ]]; then
+ echo -ne "\e]0;$(id -un)@${_hostname%%\.*}\e\\"
+ fi
}
export PROMPT_COMMAND="__make_prompt"