feat(algorithm): monocle #7

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

Add a monocle algorithm — every pane fullscreen, focus cycles between them. dwm's monocle layout.

Scope

  • New file scripts/algorithms/monocle.sh
  • algo_relayout ensures the active pane is zoomed (via resize-pane -Z); if not currently zoomed, zoom it
  • algo_toggle matches master-stack's pattern
  • algo_promote / algo_resize_master / algo_sync_state NOT defined (no master, no width)

Acceptance criteria

  • scripts/algorithms/monocle.sh exists
  • Toggling @mosaic-enabled 1 with @mosaic-algorithm monocle zooms the focused pane
  • Splitting a pane on a monocle window: hook fires → relayout → new pane is the zoomed one
  • select-pane -t :.+ on a monocle window: focused pane changes, zoom follows (tmux's native zoom-on-active behavior + our relayout hook)
  • Test for the basic flow
  • README: add to the algorithms list

Open question

Does select-pane un-zoom by default? If so, relayout re-zooms — verify the UX feels right (might be a 1-frame flash). If it bugs, override algo_focus_next/prev to atomically un-zoom + re-zoom on the new active.

Add a `monocle` algorithm — every pane fullscreen, focus cycles between them. dwm's monocle layout. ## Scope - New file `scripts/algorithms/monocle.sh` - `algo_relayout` ensures the active pane is zoomed (via `resize-pane -Z`); if not currently zoomed, zoom it - `algo_toggle` matches master-stack's pattern - `algo_promote` / `algo_resize_master` / `algo_sync_state` NOT defined (no master, no width) ## Acceptance criteria - [ ] `scripts/algorithms/monocle.sh` exists - [ ] Toggling `@mosaic-enabled 1` with `@mosaic-algorithm monocle` zooms the focused pane - [ ] Splitting a pane on a monocle window: hook fires → relayout → new pane is the zoomed one - [ ] `select-pane -t :.+` on a monocle window: focused pane changes, zoom follows (tmux's native zoom-on-active behavior + our relayout hook) - [ ] Test for the basic flow - [ ] README: add to the algorithms list ## Open question Does `select-pane` un-zoom by default? If so, `relayout` re-zooms — verify the UX feels right (might be a 1-frame flash). If it bugs, override `algo_focus_next`/`prev` to atomically un-zoom + re-zoom on the new active.
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#7
No description provided.