Closed Taluu closed 9 years ago
What is your tmux’s window-status-format
and window-status-current-format
?
$ tmux show-window-option -g window-status-format
$ tmux show-window-option -g window-status-current-format
$ tmux show-window-option -g window-status-format
window-status-format "#I:#W#F"
$ tmux show-window-option -g window-status-current-format
window-status-current-format "#I:#W#F"
I think this is the default option (I didn't changed it in my tmux config)
And if I'm doing a :rename-window Common
while I'm in my session, the window's name is correctly updated
Can you run
$ tmux --debug layout_name
So we can see which commands are sent to tmux
by teamocil
? Thanks!
$ teamocil --debug my_layout
tmux rename-session 'Random session'
tmux send-keys -t 0 'cd "~/path/to/root"'
tmux send-keys -t 0 'Enter'
tmux rename-window 'Common'
tmux send-keys -t 0 'first-panel'
tmux send-keys -t 0 'Enter'
tmux split-window -c '~/path/to/root'
tmux send-keys -t 1 'second-panel'
tmux send-keys -t 1 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0
tmux select-window -t 0
This is a bit changed, as I removed the thing that doesn't concert this ticket, but the operation order is the same. As I have mutliple windows, you can also add a tmux new-window -n 'Another window' -c '~/path/to/another-root'
After some more tests, it seems that tmux is resetting the window name after making a new split panel (but not a new window).
If that is indeed the case, I think the tmux rename-window
command should be sent after the splitting is done ?
After some more tests, it seems that tmux is resetting the window name after making a new split panel (but not a new window).
What is your tmux version (tmux -V
)? It doesn’t make sense for tmux to reset the window name after creating a new pane. This is not the behavior users want when they manually create a new pane in the window anyway.
I also don’t see this behavior when I run a layout with --here
on my teamocil/tmux setup.
$ tmux -V
tmux 1.9a
something even stranger ; it seems that the window changes its name with the last input on any panel that makes this window... Is it maybe due to my tmux configuration ?
set-option -g default-shell "/usr/bin/zsh"
setw -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window off
set -g mouse-utf8 on
# vi for the win
set-window-option -g mode-keys vi
# vim ftw !
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# from http://unix.stackexchange.com/a/16405
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind-key -t vi-copy y copy-pipe 'xclip -selection clipboard >/dev/null'
Does the "last input on any panel" behavior happens even without using teamocil? If so, it looks like this is a tmux
bug or something related to your .tmux.conf
. You might have better luck trying to solve it with the tmux
community :smile:
seems to be the case ; closing then. :)
Alright, good luck!
Found what was wrong ; it appears to be due to (oh-my-?)zsh which behaves incorrectly. Found the solution in http://superuser.com/questions/306028/tmux-and-zsh-custom-prompt-bug-with-window-name :)
Let's say I have the following config:
The session name is correctly set, but the window name seems to be whatever the first panel command line was instead of expected "Common"