From 047933378f51bf0c5ae1006f0644cd3dda2ccf7c Mon Sep 17 00:00:00 2001 From: Mark Szymanski Date: Sat, 5 Feb 2011 11:49:47 -0600 Subject: [PATCH] Added titlebar PWD to modern theme --- themes/modern/modern.theme.bash | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash index 8688f36..9f5d47a 100644 --- a/themes/modern/modern.theme.bash +++ b/themes/modern/modern.theme.bash @@ -7,6 +7,15 @@ SCM_GIT_CHAR='${bold_green}±${normal}' SCM_SVN_CHAR='${bold_cyan}⑆${normal}' SCM_HG_CHAR='${bold_red}☿${normal}' +case $TERM in + xterm*) + TITLEBAR="\[\033]0;\w\007\]" + ;; + *) + TITLEBAR="" + ;; +esac + PS3=">> " is_vim_shell() { @@ -32,10 +41,10 @@ prompt() { # Yes, the indenting on these is weird, but it has to be like # this otherwise it won't display properly. - PS1="${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) + PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) ${bold_red}└─▪${normal} " else - PS1="┌─$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) + PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) └─▪ " fi } -- 2.17.1