learntmux.dev

Apply window layouts

Goal

Window 0 has been even-vertical, then main-vertical, and is now tiled.

select-layout name at the prompt rearranges every pane in the window at once. C-b Space cycles the same presets in order.

There are five:

even-horizontal
equal columns, side by side
even-vertical
equal rows, stacked
main-horizontal
one large pane on top, the rest in a row beneath
main-vertical
one large pane on the left, the rest stacked on the right
tiled
a grid

Applying a layout keeps every pane’s contents and the active pane; it only recomputes sizes. Any manual resizing you did is overwritten.

Do this

Press C-b :, type select-layout even-vertical, Enter.

Four equal rows.

Press C-b :, type select-layout main-vertical, Enter.

A is large on the left; B, C and D stack on the right.

Press C-b Space until you see a two-by-two grid.

That is tiled.

Layout presets and tmux versions

C-b M-1 to M-5 apply presets directly — M-7 on tmux 3.5 and newer, which added mirrored main layouts. Which number means which shifted between versions, so C-b / then the key is the way to check yours.

Stuck on this one?

This is a live terminal. Typing goes to the machine, including Tab. Press Shift and Tab together to move focus back out to the page.

A real terminal, in this tab

about 15 MB, once

session learn

Done when

not started
  1. Window 0 of session learn is arranged in a single column, no nesting— not done yet
  2. Window 0 of session learn has one large pane on the left and a stacked column on the right— not done yet
  3. Window 0 of session learn is tiled: two rows of two panes— not done yet