Skip to content

feat: throw to the next display, larger and smaller, and cycled halves - #116

Merged
ostapondo merged 2 commits into
mainfrom
feat/throw-resize-cycle
Aug 26, 2026
Merged

ostapondo merged 2 commits into
mainfrom
feat/throw-resize-cycle

Conversation

@ostapondo

Copy link
Copy Markdown
Owner

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

(cd App && swift build)
./scripts/test.sh                 497 pass, 16 new
./scripts/lint.sh
node scripts/check-strings.mjs

Checks

  • swift build passes on every commit in the branch
  • New logic is covered: WindowSizingTests, PresetCycleTests, DisplayOrderTests, VoiceThrowResizeTests, and the URL names in URLCommandTests
  • Conventional commits
  • Nothing touches the network, permissions, entitlements or the update path
  • No screenshots; the visible change is two new shortcut sections and a Keys card on the Zones page

If this moves windows

Setup: macOS 26, one built-in display at 2x.

  • One screen. Driven through plonk://execute-action on a bench window: left-half three times gave w 0.5, 0.67, 0.33; center then larger grew it from w 0.6 to 0.62 and smaller brought it back; next-display on one screen moved nothing and said so; unsnap restored the original frame.
  • Put it back. ⌃⌥0 after larger and after a cycle restores the frame from before the first move.
  • Second monitor: no hardware. The throw is the case that needs it; DisplayOrderTests covers the left-to-right order.
  • Mixed scale factors: no hardware.
  • Unplug and plug back in: not touched.
  • Excluded app: all four go through the same focused() check as the other shortcuts.
left-half x3
  plonk-bench-1.txt      screen 0  x 0.000  y 0.000  w 0.500  h 1.000
  plonk-bench-1.txt      screen 0  x 0.000  y 0.000  w 0.670  h 1.000
  plonk-bench-1.txt      screen 0  x 0.000  y 0.000  w 0.330  h 1.000
center, larger, smaller
  plonk-bench-1.txt      screen 0  x 0.200  y 0.150  w 0.600  h 0.700
  plonk-bench-1.txt      screen 0  x 0.190  y 0.140  w 0.620  h 0.730
  plonk-bench-1.txt      screen 0  x 0.200  y 0.150  w 0.600  h 0.700
unsnap
  plonk-bench-1.txt      screen 0  x 0.110  y 0.050  w 0.380  h 0.390

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
@ostapondo
ostapondo merged commit 27dacfc into main Aug 26, 2026
6 of 7 checks passed
@ostapondo
ostapondo deleted the feat/throw-resize-cycle branch August 26, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant