Rework changing pane titles.
authorIain Patterson <me@iain.cx>
Thu, 10 Apr 2014 16:01:57 +0000 (17:01 +0100)
committerIain Patterson <me@iain.cx>
Wed, 28 May 2014 09:50:16 +0000 (10:50 +0100)
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

index 2ac48a8..9b7e9d0 100644 (file)
@@ -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