feat(algorithm): grid #6

Closed
opened 2026-04-25 16:16:13 +00:00 by barrettruth · 0 comments
barrettruth commented 2026-04-25 16:16:13 +00:00

Add a grid algorithm that uses tmux's native tiled layout — equal-size cells in a grid.

Scope

  • New file scripts/algorithms/grid.sh
  • algo_relayout calls select-layout -t "$win" tiled
  • algo_toggle matches master-stack's pattern (set/unset @mosaic-enabled, call relayout on enable)
  • algo_promote and algo_resize_master are NOT defined (no master concept). dispatch_optional will surface friendly errors if user binds them.
  • algo_sync_state is NOT defined (nothing to sync — no mfact)

Acceptance criteria

  • scripts/algorithms/grid.sh exists, exposes algo_relayout + algo_toggle
  • Setting @mosaic-algorithm grid on a window applies tiled layout
  • Test: grid window with N panes uses tiled layout (visible in #{window_layout})
  • Test: promote on a grid window surfaces 'grid does not implement promote'
  • README: add to the algorithms list
Add a `grid` algorithm that uses tmux's native `tiled` layout — equal-size cells in a grid. ## Scope - New file `scripts/algorithms/grid.sh` - `algo_relayout` calls `select-layout -t "$win" tiled` - `algo_toggle` matches master-stack's pattern (set/unset `@mosaic-enabled`, call relayout on enable) - `algo_promote` and `algo_resize_master` are NOT defined (no master concept). `dispatch_optional` will surface friendly errors if user binds them. - `algo_sync_state` is NOT defined (nothing to sync — no mfact) ## Acceptance criteria - [ ] `scripts/algorithms/grid.sh` exists, exposes `algo_relayout` + `algo_toggle` - [ ] Setting `@mosaic-algorithm grid` on a window applies tiled layout - [ ] Test: grid window with N panes uses `tiled` layout (visible in `#{window_layout}`) - [ ] Test: `promote` on a grid window surfaces 'grid does not implement promote' - [ ] README: add to the algorithms list
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/tmux-mosaic#6
No description provided.