From 7cf492945368ecaf37815744f4cc756aac455c31 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 13 Jul 2012 15:35:01 +0200 Subject: /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) --- bashrc/common/prompt.sh | 4 ++++ 1 file changed, 4 insertions(+) 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" -- cgit v1.2.3