melreusthe rectangle field manual

Fixes

Windows Come Out the Wrong Size: Gaps, Minimums and Curtain Resize

When a command produces geometry you did not expect, one of six settings is usually responsible — and four of them have no interface.

06 Jul 2026 · 7 min read · updated for current macOS

Expectedexact halfexact halfWith gaps + edge gapshalf minus gapshalf minus gaps
Both are correct. The right-hand result is what gap settings produce, and it surprises people who forgot they set them.

Read the log before assuming

Every successful command prints the geometry it applied. That turns a vague complaint into an arithmetic question you can answer in seconds — compare the numbers against your screen's resolution and the discrepancy usually identifies itself.

Terminal — zsh2026-07-06T09:12:44: Left Half | Safari2026-07-06T09:12:44: Executed: x:8 y:33 w:1264 h:1399# screen is 2560x1440 at 2x → 1280x720 points# w:1264 instead of 1280 → 8px gap on each side# y:33 instead of 25 → menu bar plus an 8px top gap
Reading the applied geometry. A 16-point shortfall in width is a gap setting, not a bug.

If the applied width is exactly half minus a constant, you have gaps. If it is larger than requested, you are hitting an application's minimum size. If it is unchanged, the command did not reach the window at all, which is a different guide entirely.

Gaps, and the two kinds of them

There are two independent gap systems and people frequently have both on without realising.

Gaps between windows is the visible setting: a margin around every snapped window. Screen edge gaps are separate hidden values that reserve space at the edges of the display so nothing is ever placed there — intended for dock replacements and menu bar replacements.

# what is set right now?
defaults read com.knollsoft.Rectangle gapSize
defaults read com.knollsoft.Rectangle screenEdgeGapTop
defaults read com.knollsoft.Rectangle screenEdgeGapBottom
defaults read com.knollsoft.Rectangle screenEdgeGapLeft
defaults read com.knollsoft.Rectangle screenEdgeGapRight

By default the between-windows gap also applies to maximise, which is why a maximised window can fail to reach the screen edge. Both maximise and maximise-height can be excluded:

# do not apply gaps when maximizing
defaults write com.knollsoft.Rectangle applyGapsToMaximize -int 2

# same for maximize height
defaults write com.knollsoft.Rectangle applyGapsToMaximizeHeight -int 2
killall Rectangle && open -a Rectangle
On a notched MacBook

The top edge gap can be set separately for a screen with a notch, and edge gaps can be restricted to the main screen only — useful when just one display has a dock replacement. Both are covered in the gaps guide.

Applications that refuse to be small

Many applications declare a minimum window size. Asked for a quarter of a laptop display, such a window will be placed as close as it can and will overflow the intended region. Nothing external can override this — the constraint belongs to the application.

Two responses: give that application a larger fraction on that display, or move it to a bigger screen. On scaled displays this is more common than people expect, because scaling reduces the number of points available while the application's minimum is expressed in points.

Make Smaller and Make Larger behave oddly

The incremental resize commands have four hidden settings, and each of them explains a different complaint.

The step is too small or too large. The default is 30 pixels per press:

defaults write com.knollsoft.Rectangle sizeOffset -float 60

It stops shrinking. There is a floor, defaulting to 25% of the screen in each dimension:

defaults write com.knollsoft.Rectangle minimumWindowWidth -float 0.15
defaults write com.knollsoft.Rectangle minimumWindowHeight -float 0.15

The wrong edge moves. By default a window touching a screen edge keeps that edge fixed and resizes only the free side — "curtain" behaviour. It is what you want most of the time, and ambiguous once gaps are involved, since the window no longer actually touches anything. To get traditional resizing where the window floats and both edges move:

defaults write com.knollsoft.Rectangle curtainChangeSize -int 2

It changes both dimensions when I want one. The standard commands adjust width and height together. Separate width-only and height-only commands exist but have no interface entry, so they must be bound from the terminal:

# ctrl+option+]  and  ctrl+option+[  for width only
defaults write com.knollsoft.Rectangle largerWidth -dict-add keyCode -float 30 modifierFlags -float 786432
defaults write com.knollsoft.Rectangle smallerWidth -dict-add keyCode -float 33 modifierFlags -float 786432

# ctrl+option+shift+]  and  ctrl+option+shift+[  for height only
defaults write com.knollsoft.Rectangle largerHeight -dict-add keyCode -float 30 modifierFlags -float 917504
defaults write com.knollsoft.Rectangle smallerHeight -dict-add keyCode -float 33 modifierFlags -float 917504

Almost Maximize is not the size I want

The almost-maximise command defaults to 90% of the screen in both dimensions. Both are adjustable independently, which makes it a genuinely useful general-purpose "comfortable large window" command rather than a novelty:

# 80% wide, 95% tall
defaults write com.knollsoft.Rectangle almostMaximizeWidth -float 0.8
defaults write com.knollsoft.Rectangle almostMaximizeHeight -float 0.95

There is also a fully custom centring command with an explicit pixel size, which has no interface entry at all and must be bound by keycode. It is the right tool if you need one specific window dimension repeatedly — a fixed browser viewport for testing, for example. Details in the terminal commands reference.

Stage Manager is stealing width

With Stage Manager enabled, a strip on the left is reserved for the window stack, so a maximised window legitimately does not reach the left edge. The reserved width defaults to 190 and can be set explicitly, either in pixels or as a proportion of screen width:

# reserve 220 pixels
defaults write com.knollsoft.Rectangle stageSize -float 220

# or 12% of the screen width
defaults write com.knollsoft.Rectangle stageSize -float 0.12

If you do not use Stage Manager but recently had it on, check that it is actually off in System Settings → Desktop & Dock — a reserved strip with no visible stack is a confusing thing to debug.

Get the current build

Rectangle is free and open source. Everything documented here works in the standard build.

Download from rectangleapp.com

Questions

Why does maximise leave a margin?

The between-windows gap applies to maximise by default. Set applyGapsToMaximize to 2 to exclude it.

Why will one app not shrink to a quarter?

It declares a minimum window size. That constraint belongs to the application and cannot be overridden externally.

Why does resizing move the wrong edge?

Curtain resize keeps edges touching the screen fixed. Set curtainChangeSize to 2 for traditional floating resize.

Can I resize width without changing height?

Yes, using the largerWidth and smallerWidth commands. They have no interface entry and must be bound from the terminal.