Repository navigation
Conversation
Freeform 1 to Freeform 4, at the end of Settings > Shortcuts > ⋯ > Extra, move the focused window to an area chosen with the Select button beside each of them. Select covers every display with a screenshot-style overlay. Drag to select an area; as in the macOS screenshot selection, hold Space to move the selection, Option to resize it around its starting point and Shift to resize it along one axis, and press Esc to cancel. The overlay shows the preset's current area and the new area's size. Selections stay in the display's usable area, snap to whole points and to the display edges the pointer can't reach, and are stored relative to the usable area of their display. Once a preset has an area, its row shows an icon of where the area is on the display, drawn in the style of the other window position icons. While selecting, the settings window is made transparent rather than ordered out, so the Shortcuts view stays on screen and the selection isn't cancelled as it starts. A preset moves the window to the display its area was selected on, whichever display the window or the cursor is on, and uses the window's display when that one isn't connected. Repeating it doesn't cycle displays. The window gets exactly the selected area, without window gaps; screen edge gaps are outside the area that can be selected. The actions are excluded from the menu bar menu and drag-to-snap, and TerminalCommands.md documents their keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Rectangle.app.-.custom.form.windows.mp4
Adds four Freeform positions, Freeform 1 to Freeform 4, at the end of the Extra section of the Shortcuts settings. Each one moves the focused window to an area you choose by dragging on the screen, the way you select an area for a screenshot in macOS.
This is for layouts the fixed positions can't express, such as a window in a specific spot on an ultrawide display or next to a sidebar. It's the "custom window size/place" request from #1362 without needing Terminal commands.
What it does
defaults write(documented inTerminalCommands.md).Behavior
adjustedVisibleFrame, so the menu bar, the Dock, the Todo sidebar and screen edge gaps are excluded). They are stored relative to that area, so a preset keeps its proportions when the Dock moves or the resolution changes.ShortcutManagerskips.cycleMonitorfor these actions).WindowAction.active(raw values 147–150), so they get shortcuts,rectangle://execute-action?name=freeform-oneURLs and config export/import like other actions. The areas are saved infreeformOneRegion…freeformFourRegion.Implementation notes
ShortcutRecordingObserverpath used while recording a shortcut.FreeformDrag: the selection geometry is a small value type with no AppKit dependency. It handles modifiers, clamping and snapping to whole points. It also snaps to the display edges the pointer can't reach: AppKit never reports the last column or the bottom pixel row.FreeformRegion: the stored area, as aCodablevalue: the rect relative to the usable area, plus the display's UUID.Localizable.xcstrings, with Ukrainian and Simplified Chinese translations.Testing
70 new XCTest tests:
FreeformDragTests: selection geometry, modifiers, clamping and edge snappingFreeformRegionTests: storage, scaling and invalid dataFreeformSelectionControllerTests: the overlay on two displays, driven by realNSEvents sent through the panels, covering dragging, Space, Option, Shift, Esc, interruptions and drawingFreeformSettingsTests: clicking Select in a realShortcutsViewControllerand dragging, for all four presets; also checks the icons, cancelling, and that shortcuts are suspendedFreeformPreviewTests: the icon matches the Left Half and Center icons pixel for pixelFreeformCalculationTests,FreeformScreenSelectionTests: the calculation, and the display choiceShortcutManagerSessionTests.testFreeformRepeatDoesNotCycleDisplaysThe tests compare against localized strings, so they pass in any system language. The whole suite passes on GitHub Actions (
xcode-27): https://github.com/gslava/Rectangle/actions/runs/44932907924Also tested by hand: MacOS 15.8.3 (M1 Pro) with one display: all four presets, the modifiers, Esc, and the shortcuts