Skip to content

Tiling Layouts

termtile provides several tiling algorithms and supports restricted regions for window placement.

Layout Modes

ModeDescription
AutoDynamic grid calculation. cols = ceil(sqrt(n)), rows = ceil(n/cols).
FixedExplicit rows and columns grid (e.g., 2x2).
VerticalSingle column; windows stacked top-to-bottom.
HorizontalSingle row; windows placed side-by-side.
Master-StackOne master window on the left, others in a grid on the right.

Built-in Layouts

termtile comes with several pre-configured layouts:

NameModeRegionNotes
gridAutoFullOptimized dynamic grid.
columnsVerticalFullSimple column stack.
rowsHorizontalFullSide-by-side row.
half-leftAutoLeft HalfTiles only on the left 50% of screen.
half-rightAutoRight HalfTiles only on the right 50% of screen.
master-stackMasterStackFullSlot 0 is the master (40% width).

Tile Regions

Regions restrict where windows are placed on the screen.

  • full: Entire work area (minus docks/panels).
  • left-half / right-half: Vertical split.
  • top-half / bottom-half: Horizontal split.
  • custom: Percentage-based custom area.
yaml
tile_region:
  type: "custom"
  x_percent: 10
  y_percent: 10
  width_percent: 80
  height_percent: 80

Customization

Gaps and Padding

  • Gap Size: Space between windows.
  • Screen Padding: Extra space around the edges of the monitor (top, bottom, left, right).

Constraints

  • Max Terminal Size: Caps the width or height of individual windows in a layout.
  • Flexible Last Row: In auto mode, the last row can expand to fill the width if it has fewer windows than columns.

Terminal Sorting

Determines the order windows are placed into the grid:

  • position: Sorted by Y then X coordinates.
  • window_id: Sorted by X11 window ID.
  • active_first: The focused window is placed in slot 0.
  • session_slot: Sorted by tmux slot number (ideal for Master-Stack).

Interaction

Cycling Layouts

You can cycle through layouts using hotkeys (default Mod4-Mod1-] and Mod4-Mod1-[).

Undo

Restores windows to their exact positions before the last tiling operation.

Preview

Temporarily apply a layout to see how it looks:

bash
termtile layout preview --duration 5 grid

After 5 seconds, the windows will revert to their previous positions.

Tiling window manager with AI agent orchestration