feat: throw to the next display, larger and smaller, and cycled halves - #116
Merged
Merged
Conversation
Four actions on Rectangle's keys: ⌃⌥⌘→ and ⌃⌥⌘← send the front window to the next or previous display, keeping its zone number where that display has one and its share of the screen otherwise; ⌃⌥= and ⌃⌥- grow and shrink it by 30 points about the centre, a side against the screen edge staying put. A half's key pressed on a window already in that half steps through two thirds and a third, with a switch on the Zones page. All four answer to Rectangle's URL names and import with its shortcuts, and "throw it to the next screen" and "make it bigger" work out loud.
# Conflicts: # App/Sources/plonk/VoiceCommands.swift # CHANGELOG.md
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.
What changed, and why
Four things a Rectangle user reaches for that Plonk did not have, on Rectangle's keys:
⌃⌥⌘→and⌃⌥⌘←throw the front window to the next or previous display. If it was in a numbered zone and the other display's set has that number, it lands in that zone; otherwise it keeps its share of the screen.⌃⌥=and⌃⌥-grow and shrink the window by 30 points about its centre. A side against the screen edge stays there, so a left half grows to the right. A window filling the screen only shrinks.⌃⌥←on a window already in the left half takes two thirds, then a third, then the half again. Same for the other three halves. Off with a switch under Keys on the Zones page.All four answer to Rectangle's URL names (
next-display,previous-display,larger,smaller) and come across with the Rectangle import. "throw it to the next screen" and "make it bigger" work by voice.What you ran
Checks
swift buildpasses on every commit in the branchWindowSizingTests,PresetCycleTests,DisplayOrderTests,VoiceThrowResizeTests, and the URL names inURLCommandTestsIf this moves windows
Setup: macOS 26, one built-in display at 2x.
plonk://execute-actionon a bench window:left-halfthree times gave w 0.5, 0.67, 0.33;centerthenlargergrew it from w 0.6 to 0.62 andsmallerbrought it back;next-displayon one screen moved nothing and said so;unsnaprestored the original frame.⌃⌥0after larger and after a cycle restores the frame from before the first move.DisplayOrderTestscovers the left-to-right order.focused()check as the other shortcuts.