Contents
How this works, and the three rules
Preferences live in a domain named after the application's bundle identifier. You write values with <code>defaults write</code> and the app reads them at launch. There is no interface for most of what follows, which is deliberate — the settings window is kept small on purpose and the depth lives here instead.
- Restart the app after every change. Values are loaded at startup. This is the single most common reason a correct command appears to do nothing.
- Rectangle Pro uses a different domain. Replace <code>com.knollsoft.Rectangle</code> with <code>com.knollsoft.Hookshot</code> throughout.
- Types are not interchangeable. <code>-int</code>, <code>-float</code>, <code>-bool</code> and <code>-string</code> must match what the key expects, or the value is ignored.
# the pattern for everything below
defaults write com.knollsoft.Rectangle KEY -TYPE VALUE
killall Rectangle && open -a Rectangle
# inspect a single key
defaults read com.knollsoft.Rectangle KEY
# undo a single key (revert to the built-in default)
defaults delete com.knollsoft.Rectangle KEY
The settings pane writes a JSON file containing every binding. Export before you start experimenting and any mistake below costs ten seconds to undo rather than an evening of rebinding.
Behaviour on repeated presses
The most consequential single setting in the whole domain, because it changes what happens every time you press a shortcut twice.
| Value | Behaviour |
|---|---|
| <code>0</code> | Halves to thirds — the Spectacle behaviour |
| <code>1</code> | Repeated left/right moves the window to the adjacent display |
| <code>2</code> | Disabled — a second press does nothing |
| <code>3</code> | Cycle displays for left/right, cycle sizes for everything else |
| <code>4</code> | Repeat the same action on the next display |
defaults write com.knollsoft.Rectangle subsequentExecutionMode -int 2
# make Center Half cycle thirds too: 1/2 → 2/3 → 1/3
defaults write com.knollsoft.Rectangle centerHalfCycles -int 1
# make directional moves also resize (uses the halves-to-thirds mode)
defaults write com.knollsoft.Rectangle resizeOnDirectionalMove -bool true
# don't centre the window along the edge it is moved to
defaults write com.knollsoft.Rectangle centeredDirectionalMove -int 2
There is a full guide devoted to this key, because the interaction between cycling and display-switching is where most confusion about "it moved to the wrong place" originates.
Sizes that have no interface entry
Several families of sizing commands exist in the code but appear nowhere in the settings window. They must be bound by keycode and modifier value. The reference table for those numbers is in the keycodes guide; the modifier values are summed.
| Family | Keys available |
|---|---|
| Ninths (3×3 grid) | <code>topLeftNinth</code> … <code>bottomRightNinth</code> — nine keys |
| Eighths (4×2 grid) | <code>topLeftEighth</code> … <code>bottomRightEighth</code> — eight keys |
| Corner two-thirds | <code>topLeftThird</code>, <code>topRightThird</code>, <code>bottomLeftThird</code>, <code>bottomRightThird</code> |
| Doubling / halving | <code>doubleWidthRight</code>, <code>halveHeightUp</code> and six siblings |
| Width-only resize | <code>largerWidth</code>, <code>smallerWidth</code> |
| Height-only resize | <code>largerHeight</code>, <code>smallerHeight</code> |
| Custom-size centring | <code>specified</code> plus <code>specifiedWidth</code> / <code>specifiedHeight</code> |
| Prominent centring | <code>centerProminently</code> — centred but raised slightly |
| Tiling and cascading | <code>tileAll</code>, <code>cascadeAll</code>, <code>tileActiveApp</code>, <code>cascadeActiveApp</code> |
# ctrl+option+shift+1 → top-left ninth
defaults write com.knollsoft.Rectangle topLeftNinth -dict-add keyCode -float 18 modifierFlags -float 917504
# a centring command with an exact pixel size
defaults write com.knollsoft.Rectangle specified -dict-add keyCode -float 8 modifierFlags -float 1966080
defaults write com.knollsoft.Rectangle specifiedWidth -float 1680
defaults write com.knollsoft.Rectangle specifiedHeight -float 1050
Command 1048576, Option 524288, Control 262144, Shift 131072, Fn 8388608. Control+Option+Shift is therefore 917504, and Control+Option is 786432. The full table with keycodes is in the dedicated reference.
Gaps and screen edges
# reserve space at the screen edges (dock or menu bar replacements)
defaults write com.knollsoft.Rectangle screenEdgeGapTop -int 10
defaults write com.knollsoft.Rectangle screenEdgeGapBottom -int 10
defaults write com.knollsoft.Rectangle screenEdgeGapLeft -int 10
defaults write com.knollsoft.Rectangle screenEdgeGapRight -int 10
# a separate top gap for a notched display
defaults write com.knollsoft.Rectangle screenEdgeGapTopNotch -int 5
# apply edge gaps only on the main screen
defaults write com.knollsoft.Rectangle screenEdgeGapsOnMainScreenOnly -bool true
# stop the between-windows gap applying to maximise
defaults write com.knollsoft.Rectangle applyGapsToMaximize -int 2
defaults write com.knollsoft.Rectangle applyGapsToMaximizeHeight -int 2
Snap areas and the drag experience
# require a modifier before dragging snaps anything (cmd = 1048576)
defaults write com.knollsoft.Rectangle snapModifiers -int 1048576
# widen the trigger margins (default 5 each)
defaults write com.knollsoft.Rectangle snapEdgeMarginTop -int 20
# disable individual regions — bit field; 1 = the top maximise region
defaults write com.knollsoft.Rectangle ignoredSnapAreas -int 1
# enable corner regions that produce sixths
defaults write com.knollsoft.Rectangle sixthsSnapArea -bool true
# stop fast upward drags triggering Mission Control
defaults write com.knollsoft.Rectangle missionControlDragging -int 2
The drag preview — the footprint — is fully themeable, which is the closest thing the app has to a cosmetic setting:
defaults write com.knollsoft.Rectangle footprintAlpha -float 0.45
defaults write com.knollsoft.Rectangle footprintBorderWidth -float 3
defaults write com.knollsoft.Rectangle footprintFade -int 2
defaults write com.knollsoft.Rectangle footprintColor -string "{\"red\":0,\"blue\":0.5,\"green\":0.5}"
defaults write com.knollsoft.Rectangle footprintAnimationDurationMultiplier -float 1.5
Resize increments and limits
# pixels per press of Make Larger / Make Smaller (default 30)
defaults write com.knollsoft.Rectangle sizeOffset -float 60
# how small Make Smaller is allowed to go (default 0.25 of the screen)
defaults write com.knollsoft.Rectangle minimumWindowWidth -float 0.15
defaults write com.knollsoft.Rectangle minimumWindowHeight -float 0.15
# traditional floating resize instead of curtain resize
defaults write com.knollsoft.Rectangle curtainChangeSize -int 2
# Almost Maximize proportions (default 0.9 of each dimension)
defaults write com.knollsoft.Rectangle almostMaximizeWidth -float 0.8
defaults write com.knollsoft.Rectangle almostMaximizeHeight -float 0.95
Displays, cursor and window restore
# order displays purely left-to-right by x coordinate
defaults write com.knollsoft.Rectangle screensOrderedByX -int 1
# move the pointer with the window on any shortcut
defaults write com.knollsoft.Rectangle moveCursor -int 1
# do not restore the original size when a snapped window is dragged loose
defaults write com.knollsoft.Rectangle unsnapRestore -int 2
Title bar, Stage Manager, Todo Mode
# what a double-click on the title bar does (action id + 1)
defaults write com.knollsoft.Rectangle doubleClickTitleBar -int 3
# do not restore when double-clicked again
defaults write com.knollsoft.Rectangle doubleClickTitleBarRestore -int 2
# exclude specific apps from title bar double-click
defaults write com.knollsoft.Rectangle doubleClickTitleBarIgnoredApps -string "[\"com.microsoft.Outlook\"]"
# width reserved for the Stage Manager strip (default 190)
defaults write com.knollsoft.Rectangle stageSize -float 220
# unhide Todo Mode
defaults write com.knollsoft.Rectangle todo -int 1
# switch to the Magnet-style default shortcut set
defaults write com.knollsoft.Rectangle alternateDefaultShortcuts -bool true
Auditing and undoing
Two habits make all of this safe. Keep a record of what you set, and know how to get back to stock.
# what have I changed?
defaults read com.knollsoft.Rectangle
# snapshot it for your dotfiles
defaults export com.knollsoft.Rectangle ~/dotfiles/rectangle.plist
# restore that snapshot
defaults import com.knollsoft.Rectangle ~/dotfiles/rectangle.plist
# nuclear option: back to factory defaults
killall Rectangle
defaults delete com.knollsoft.Rectangle
open -a Rectangle
The authoritative list is maintained in the project repository and gains entries over time; this page groups it by intention rather than alphabetically. When a key here disagrees with the upstream reference, upstream wins.
Get the current build
Rectangle is free and open source. Everything documented here works in the standard build.
Download from rectangleapp.comQuestions
Why do I have to restart the app every time?
Preference values are read at startup. There is no live reload.
Do these survive an app update?
Yes. They live in the preference domain, which updates do not clear. A full uninstall that deletes preferences does clear them.
What if a command has no effect?
Check three things: did you restart the app, is the bundle identifier right for free versus Pro, and does the type match.
Is there any risk?
Nothing here can damage macOS. The worst case is a configuration you dislike, undone with defaults delete.