Skip to content

Grid

Arranges windows in a dynamic grid that adapts to window count. Every window gets equal space with no hierarchy or main window.

Layout

1 window

┌───────────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ 1 │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└───────────────────────────────────────────────────────────┘

2 windows

┌─────────────────────────────┬─────────────────────────────┐
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ 1 │ 2 │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
└─────────────────────────────┴─────────────────────────────┘

3 windows

┌─────────────────────────────┬─────────────────────────────┐
│ │ │
│ │ │
│ │ │
│ 1 │ 2 │
│ │ │
│ │ │
│ │ │
│ │ │
├─────────────────────────────┴─────────────────────────────┤
│ │
│ │
│ │
│ 3 │
│ │
│ │
│ │
│ │
└───────────────────────────────────────────────────────────┘

4 windows

┌─────────────────────────────┬─────────────────────────────┐
│ │ │
│ │ │
│ │ │
│ 1 │ 2 │
│ │ │
│ │ │
│ │ │
│ │ │
├─────────────────────────────┼─────────────────────────────┤
│ │ │
│ │ │
│ │ │
│ 3 │ 4 │
│ │ │
│ │ │
│ │ │
│ │ │
└─────────────────────────────┴─────────────────────────────┘

5 windows

┌───────────────────┬───────────────────┬───────────────────┐
│ │ │ │
│ │ │ │
│ │ │ │
│ 1 │ 2 │ 3 │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├───────────────────┴───────────────────┼───────────────────┤
│ │ │
│ │ │
│ │ │
│ 4 │ 5 │
│ │ │
│ │ │
│ │ │
│ │ │
└───────────────────────────────────────┴───────────────────┘

6 windows

┌───────────────────┬───────────────────┬───────────────────┐
│ │ │ │
│ │ │ │
│ │ │ │
│ 1 │ 2 │ 3 │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├───────────────────┼───────────────────┼───────────────────┤
│ │ │ │
│ │ │ │
│ │ │ │
│ 4 │ 5 │ 6 │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
└───────────────────┴───────────────────┴───────────────────┘

Capabilities

  • Adjustable ratio: No
  • Adjustable nmaster: No
  • Stateful: No

How the grid is calculated

Grid dimensions aim for roughly square cells:

columns = ceil(sqrt(window_count))
rows = ceil(window_count / columns)
WindowsColumnsRowsResult
1111x1
2212x1
3-4222x2
5-6323x2
7-9333x3
10-12434x3

Incomplete rows

When windows do not fill the grid exactly, the last row stretches:

5 windows in 3x2 grid:

┌───────────────────┬───────────────────┬───────────────────┐
│ │ │ │
│ │ │ │
│ │ │ │
│ 1 │ 2 │ 3 │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
├───────────────────┴───────────────────┼───────────────────┤
│ │ │
│ │ │
│ │ │
│ 4 │ 5 │
│ │ │
│ │ │
│ │ │
│ │ │
└───────────────────────────────────────┴───────────────────┘

Window 4 expands to fill the empty cell, giving both bottom windows equal width.

When to use

Grid works well for:

  • Comparing multiple documents or outputs side by side
  • Dashboard-style monitoring (logs, metrics, terminals)
  • Situations where all windows are equally important
  • Quick visual comparison of similar content

Grid vs BSP

Both layouts treat windows equally, but they differ in structure:

AspectGridBSP
StructureRows and columnsBinary tree
ResizingFixed equal sizePer-window ratios
StateStatelessRemembers ratios
Best forFixed comparisonFlexible many-window