If i open the window selector with <prefix>w while in a split, the window selector shows only in the current split. How can i make the window selector fill the entire terminal?

The solution ideally should be seamless: i.e., should open the window selector fullscreen regardless of whether we are already zoomed, and when leaving the window selector, the zoom state should be the same as before the window selector was opened.


tl;dr: Zoom the pane with <prefix>z or resize-pane -Z.

The default function for <prefix>w is choose-tree -w (version 2.6+; in older versions it was choose-window). These are displayed in the pane, so zoom the pane to fill the window temporarily.

Combining the two operations on a single keybind should be fairly straightforward. This can go in your .tmux.conf or into a running session (<prefix>:):

# replace default window-chooser: zoom first
bind-key -T prefix w resize-pane -Z \; choose-tree -w

See man tmux:

choose-tree [-GNsw] [-F format] [-f filter]
            [-O sort-order] [-t target-pane] [template]
    Put a pane into tree mode, where a session, window or pane may 
    be chosen interactively from a list. -s starts with sessions 
    collapsed and -w with windows collapsed. [...]
  • A few problems with this: If I am already zoomed, it will unzoom. Second problem is, when I leave the choose-tree i will have to manually unzoom. – Dylanthepiguy Jan 18 '18 at 0:47
  • @Dylanthepiguy zooming is the mechanism that answers the question you asked. you're always welcome to edit this or post your own answer if you come up with a bind-key command or other automation method that suits your workflow better. personally, i don't know any way to query the zoom state of the window, so i have no additional suggestions. – quixotic Jan 18 '18 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.