From b396b5f8c1ea1bb2ed82519109c2a7a214d85d2a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 24 Mar 2012 03:00:47 +0900 Subject: [PATCH] set title for terminal --- bashrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bashrc b/bashrc index a813449..9507aa9 100755 --- a/bashrc +++ b/bashrc @@ -452,6 +452,8 @@ __my_prompt_function(){ # used by PS1 printf "${c2}${USER}@${HOSTNAME}${cdef} ${tty} ${date} ${BASH} ${BASH_VERSION}\n" printf "shlv:${SHLVL} jobs:${jobnum} last:${lastreturn} " + TERMTITLE="${USER}@${HOSTNAME} ${PWD}" + test -n "$DISPLAY" && echo -n -e "\033]0;${TERMTITLE}\007" } # from https://wiki.archlinux.org/index.php/X_resources