0

Description

When used Ctrl + B Q . It will show you numbers and wait brief moment for further input (if any). I want to increase this time, timeout or something to 2s

I guess it will also affect commands to swap panel and other used to customize layout. That is ok, I would like to increase this too :D

How to solve this?

Do I add some entry to .tmux.conf or set global settings ?

2 Answers 2

1

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:

  1. 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
    
  2. 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.confEnter

  • 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 2000Enter

  • pass the chosen command by invoking a tmux client in a shell inside tmux:

    tmux bind-key -T prefix q display-panes -d 2000
    
0

The PrefixQ key is bound to display-panes, which has both a display-panes-time setting and accepts a "duration" option. Set the option to whatever time (ms) you like:

set -g display-panes-time 200

(Specify zero to have the numbers remain until a keypress.)

If that weren't available, you could rebind the key with the option specified:

bind-key q display-panes -d 200

You can also tell tmux to always show each pane's index (and title) inline as part of its border:

set -g pane-border-status top

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .