Repository navigation
Cycle vertical sixths through whole sixth, top half and bottom half on repeat - #1968
Merged
Merged
Conversation
Repeating a vertical sixth chord now steps through the three placements available inside that sixth: the whole sixth, then the half nearest the leading edge (top of a column, or left of a row on a portrait display), then the trailing half, then the whole sixth again. Cycling respects the repeated-command setting and does nothing when it is disabled. The old behavior, where repeating firstVerticalSixth or lastVerticalSixth stepped through all six positions, is kept behind the hidden `verticalSixthsWalkAcrossScreen` flag.
ehippy
marked this pull request as ready for review
November 16, 2026 21:40
Owner
|
Looks good.
Let me test it out I'll let you know which path I think is better. |
Owner
|
I was ok without extending this beyond sixths for now, so went ahead and merged. Since this would depart from existing functionality, and I prefer not adding anything to the UI to allow someone to get that functionality back, I decided to make this setting disabled by default. To enable it: Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Screen.Recording.2026-11-16.at.2.33.16.PM.mov
One chord pressed repeatedly: the window stays in the same sixth and steps whole sixth → half → other half → whole sixth.
I use the vertical sixths from #1917 every day. A full-height sixth is the right width but is often too tall for what I want next to it, and reaching for a second chord to get half of the column I'm already in breaks the flow.
Repeating any vertical sixth chord now cycles through the three placements available inside that sixth:
There are no new
WindowActions, so nothing new to bind: no new shortcut identifiers, strings, icons or settings UI. This only changes what a repeat press does.How this differs from the repeat behaviors that already exist
"Cycle sizes on side actions" (
CycleSize) changes what fraction of the screen a side action takes, anchored to a screen edge — repeating Top Half gives 1/3 of the display, not half of the sixth you're already in. None of the vertical sixth or eighth actions use it.halveHeightUp/halveHeightDownand friends do halve the current window, but they halve its own rect rather than snapping to the sixth boundary, need a separate chord per direction, and leave the gaps without edges to apply.What's new here is a repeat press advancing a placement within the sixth: the ordinal is preserved, the half shares the sixth's boundary (same floor rounding at the same edge), and the window stays on the sixth grid throughout.
Notes
The half is taken across the sixth, not along it. Sixths slice the display along its long axis, so the sub-split is perpendicular to that: columns split top/bottom, portrait rows split left/right. Halving a portrait row's height instead would give an ~80pt sliver.
Repeat state travels in
SubWindowAction, the way the other position-cycling actions do (cf.FirstThirdCalculation). Twenty-four new sub actions carry the ordinal plus the placement, and both directions of the ordinal ⇄ sub action mapping read from a single table so they can't drift apart.Gaps still land correctly. Each placement reports only the edges it shares with a neighbour, so a top half of a middle column reports
.left, .right, .bottomrather than the whole column's edges.One intentional behavior change. Repeating
firstVerticalSixth/lastVerticalSixthused to step through all six positions. The same chord repeating can't do both jobs, so the walk now sits behind the hiddenverticalSixthsWalkAcrossScreenflag and is documented inTerminalCommands.md. The two tests that covered the walk assert it under that flag, so the old behavior stays pinned.Worth generalizing?
I kept this to sixths deliberately. Repeat state lives in
SubWindowAction, which needs a case per position × sub-placement × orientation: 24 here, 32 more for vertical eighths, 64 for sixteenths — and the 2D grid families have no unambiguous axis to subdivide. The vertical thirds already use repeat to walk top → middle → bottom, which is the same collisionverticalSixthsWalkAcrossScreenexists for, andresizeAndCycleQuadrantsalready owns "repeat changes position" for grids.So: if you want the pattern beyond sixths, I'd move repeat state into a small struct on
RectangleActionrather than growing the enum, and I'd do that as its own change. Tell me which way you'd prefer and I'll follow up.Testing
VerticalSixthActionTestsextended: the three-stage cycle for each of the six actions, portrait rows splitting left/right, the extra pixel from an odd-sized sixth going to the trailing half, gap edges per placement, a different chord restarting at the whole sixth, and the walk under the hidden flag.Full suite passes: 776 tests, 0 failures (2 pre-existing skips). Also running it by hand on my own display, which is where the daily-use case came from.
Implemented with an AI coding assistant (pi) against a fresh clone of
main.