From 6471254f1b5a2009b79c877edf05e1623cf3083c Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 10 Apr 2014 17:01:57 +0100 Subject: [PATCH] Rework changing pane titles. If PROMPT_COMMAND is set to something which tries to change a window's title, tmux would happily override the user-supplied pane name even though set-titles is set to off. Setting allow-rename to off prevents titles from being set to annoying stuff like "[root@localhost ~]#" when becoming root on a Red Hat machine. Previously "automatic-rename = off" was commented out because allow-rename overrode it. Having an automatic name based on the current process is acceptable in case where no explicit title has been set, so we now set it on. --- .tmux.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 2ac48a8..9b7e9d0 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -204,6 +204,9 @@ setw -g window-status-activity-fg white ################################################################################ # Don't update the title bar. set -g set-titles off +set -g allow-rename off +# Allow pane renames if no name was explicitly set. +set -g automatic-rename on # Status line black on white. set -g status-attr none set -g status-bg white @@ -218,5 +221,3 @@ set -g status-right '#[fg=white,bg=colour8][#H:#S]' # Window flags. setw -g window-status-current-format '[#I.#P#F #W]' setw -g window-status-format ' #I.#P#F #W ' -# Don't set window name. XXX: Issue with PROMPT_COMMAND. -#setw -g automatic-rename off -- 2.20.1