Apply Half-Split ratio to corner actions and snap areas#1776
Conversation
|
Thanks! I like the added dropdown and I think this is a good addition. I'll test this out more thoroughly over the next day or so and let you know if I hit any snags. |
|
Ok, so it looks like we need to adjust some of the logic for repetitions. I've noticed that the height on repetitions doesn't remain as half height, even if the vertical split is set to 1/2. I think we want the height to always adhere to the split ratio, and only the width should vary on repetition. |
… repeating the same state. Fix moving window flash after resize.
|
Awesome, thanks for continued effort here. I'm thinking that perhaps most people would desire that the corner shortcuts expand horizontally on landscape oriented displays, and vertically on portrait oriented displays, which is the way I think halves work, off the top of my head. In your usage, do you see otherwise? Just thinking through whether or not it makes sense to have that config in there. |
|
After a near-day of rocking the vertical expansion on single 43" 16:9 display, I really like it. That was a nice, happy accident. The majority of users will probably continue using the current horizontal expansion, but it can make sense for some workflows. It feels a lot more like a dual monitor or L vs R workspace setup in a single screen. The overall behavior is kinda similar to scrolling vertically on a website vs horizontally, except for a whole application. With the Half-Split ratio set to 2/3 and a 190px stage manager, that gives the left hand side of my setup about a fixed 32" 4:3 screen. The right hand side is about a 24" 9:16 display, and there is a 2"x36" strip at the bottom that is used to "pin" htop, a music player, etc. The model of my simplified configuration being four corners, the center shortcut, or stage manager for applications to reside. The height of the four corner apps expanding between 1/3, 2/3, or 3/3 with a single hotkey. Then, hammerspoon allows for one more shortcut to send the centered or dock application to the back of the display window index after interaction. There's also contexts.co in the mix to easily bring up any application to the foreground. There is one more piece of default behavior that I'd like to change after some use. It would be allowing the |
|
Nice, I'm good with leaving that setting in, then.
I'm ok with that, and renaming |
|
That was a bit of a load-bearing default check box. It created a few bugs that were also closed out. The weirdest being the application losing focus and ringing the osx bell on shortcut invocation. The fix for that needed the This push also has a commit that updates the shortcut actions names, Half Split Ratio configuration option, and the ensures the snap area dropdown uses the correct terms. The scope of that got a bit messy; since, it included Top Side and Bottom Side with the Side Split Ratio updates. Having The second commit also includes a shortcut migration function, but that might not be the best long term solution. I'll happily update if you have a better best practice. |
|
Great, thanks! We'll want to leave the WindowAction names as-is, since this would break people's programmatic calls via the URL API in AppDelegate. Doing this should also remove the need for the migration. Technically, we could add in a way to route the This did make me second guess whether renaming to sides is the correct path forward, but I think it is the right way to go. Along with this, I'll plan on moving the Side Split Ratio setting into the General tab prior to the next release. |
… side name to work for future progrmatic invocations.
|
Yeah, it does get kinda sprawling. Does seem like the rename is the only way to stay sane with non-default side ratio. Pushed an update that goes back to the half/legacy names internally. It also adds a new hook via aliases with the new name for future programatic invocations. |


Summary
This changes the corner actions and snap areas to use the same Half-Split ratio preference. It also updates the UI to reduce error from whole number percentages.
This might not be a behavior change that everyone would want, but it has been useful for my workflow. It cuts down the number of repeated-command cycles I use between
Left Half/Right Half/Top Half/Bottom Halfand the corner shortcuts when usingRepeated commands: cycle sizes on half actionsThe Half-Split ratio in
General -> ... -> Half-Split ratiois now also the default ratio for:UpperLeftCalculationUpperRightCalculationLowerLeftCalculationLowerRightCalculationThat means the corner snap areas, plus the
Top Left,Top Right,Bottom Left, andBottom Rightshortcuts, now follow the configured Half-Split ratio instead of always behaving like fixed quarters.With the default
1/2ratio, behavior stays the same. With something like2/3, the corners now compose the same split used by the half actions:Top Left:2/3width x2/3heightTop Right:1/3width x2/3heightBottom Left:2/3width x1/3heightBottom Right:1/3width x1/3heightThis also adds a dropdown for the Half-Split ratio picker so common ratios can be selected directly instead of typed as whole-number percentages. The dropdown reuses the same common values as the repeated-command cycle-size options, so there is not a second hard-coded ratio list. Custom percentages still work through
Other.The matching tolerance is there to avoid precision issues with values like
1/3and2/3, and also avoided turning this into a much larger unit test refactor. That may need to change.Changes
Other1/2,2/3,3/4, and custom60%corner ratiosai disclosure: codex was used for the majority of this work. I've reviewed and tested the changes. But, swift & osx apps are a bit outside my normal wheelhouse.