feat(algorithm): spiral #48
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
skip-release-notes
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/tmux-mosaic#48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a
spiralalgorithm — recursively split panes in a spiral / Fibonacci pattern. This is a classic custom tiling layout from dwm and XMonad.Scope
scripts/algorithms/spiral.shpromoteexists or whether this layout is relayout-onlyAcceptance criteria
@mosaic-algorithm spiralapplies a deterministic spiral tilingImplementation notes
Hard algorithm. Likely needs explicit layout-string generation and CRC handling rather than
select-layout.Part of #42.
I checked the real
spiral/ Fibonacci layouts before starting this.The good news is that this one does map cleanly to tmux: it is a non-overlapping recursive split tree, so it fits tmux custom layout strings much better than
deckortwo-pane.The main semantic choice is which upstream to treat as canonical:
spiralanddwindlefrom one implementation; the first split usesmfact, then the remaining space is split recursively by alternating axes and directionsSpiralexposes a start direction, rotation, and a ratio parameter, which is a more configurable but different contractFor Mosaic, I think the cleanest first pass is to treat the dwm fibonacci patch as canonical for both
spiralanddwindle:@mosaic-mfactcontrols the first split like dwmmfactpromoteleft unsupported unless we find a very clear tmux-native meaning for itThat gives us a precise contract for
spiral, anddwindlebecomes the same generator with the sibling direction rule.