feat(algorithm): centered-master #43

Closed
opened 2026-04-26 00:36:54 +00:00 by barrettruth · 0 comments
barrettruth commented 2026-04-26 00:36:54 +00:00

Add a centered-master algorithm — one master pane centered in the window, with remaining panes split into left and right stacks. This is a common dwm/XMonad style and the clearest next non-native layout for Mosaic.

Scope

  • New file scripts/algorithms/centered-master.sh
  • algo_relayout lays out one centered master region plus left/right stacks
  • promote follows current master/stack semantics
  • resize-master changes the centered master width
  • algo_sync_state syncs dragged master width back into @mosaic-mfact
  • Define which side receives the extra pane when the stack count is odd

Acceptance criteria

  • Setting @mosaic-algorithm centered-master applies a centered master with side stacks
  • promote swaps the focused stack pane into master
  • resize-master ±N persists width in @mosaic-mfact
  • Split/kill hooks preserve centered-master structure
  • Tests cover 3, 4, and 5+ pane cases
  • README documents behavior, operations, and options

Implementation notes

This is probably the first layout that needs explicit tmux layout-string generation instead of just calling a builtin layout name.

Part of #42.

Add a `centered-master` algorithm — one master pane centered in the window, with remaining panes split into left and right stacks. This is a common dwm/XMonad style and the clearest next non-native layout for Mosaic. ## Scope - New file `scripts/algorithms/centered-master.sh` - `algo_relayout` lays out one centered master region plus left/right stacks - `promote` follows current master/stack semantics - `resize-master` changes the centered master width - `algo_sync_state` syncs dragged master width back into `@mosaic-mfact` - Define which side receives the extra pane when the stack count is odd ## Acceptance criteria - [ ] Setting `@mosaic-algorithm centered-master` applies a centered master with side stacks - [ ] `promote` swaps the focused stack pane into master - [ ] `resize-master ±N` persists width in `@mosaic-mfact` - [ ] Split/kill hooks preserve centered-master structure - [ ] Tests cover 3, 4, and 5+ pane cases - [ ] README documents behavior, operations, and options ## Implementation notes This is probably the first layout that needs explicit tmux layout-string generation instead of just calling a builtin layout name. Part of #42.
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#43
No description provided.