Press prefix? and learn what your prefixq does:
C-b q Display pane numbers
But Display pane numbers
is just a description, not really useful in further investigation. In a shell inside tmux run:
tmux list-keys | grep q
and one of the lines will be:
bind-key -T prefix q display-panes
This is useful and points us to the display-panes
tmux command. Now check the manual, it states:
display-panes [-bN] [-d duration] [-t target-client] [template]
(alias: displayp
)
Display a visible indicator of each pane shown by target-client. […] The indicator is closed when a key is pressed (unless -N
is given) or duration milliseconds have passed. If -d
is not given, display-panes-time
is used. A duration of zero means the indicator stays until a key is pressed. […]
And:
display-panes-time time
Set the time in milliseconds for which the indicators shown by the display-panes
command appear.
This leads us to two solutions:
Either re-bind prefixq so it includes -d 2000
. In ~/.tmux.conf
you do this with:
bind-key -T prefix q display-panes -d 2000
Or keep using the current binding (without -d
) and adjust display-panes-time
. In ~/.tmux.conf
:
set -g display-panes-time 2000
Keep in mind the file is parsed when a tmux server starts. To affect your already running server do one of the following:
reload the altered file in tmux:
prefix:source-file ~/.tmux.conf
Enter
reload the altered file by invoking a tmux client in a shell inside tmux:
tmux source-file ~/.tmux.conf
type the chosen tmux command in tmux, e.g.:
prefix:bind-key -T prefix q display-panes -d 2000
Enter
pass the chosen command by invoking a tmux client in a shell inside tmux:
tmux bind-key -T prefix q display-panes -d 2000