# Rectangle Terminal Commands for Hidden Preferences The preferences window is purposefully slim, but there's a lot that can be modified via Terminal. After executing a terminal command, restart the app as these values are loaded on application startup. For Rectangle Pro, please replace `com.knollsoft.Rectangle` with `com.knollsoft.Hookshot` for the following commands. A number of the commands below are for configuring keyboard shortcuts, and you'll need to know the key code and modifier flags integer values. You can use the free [key codes app](https://apps.apple.com/us/app/key-codes/id414568915) to help with this. ## Contents - [Keyboard Shortcuts](#keyboard-shortcuts) - [Adjust Behavior on Repeated Commands](#adjust-behavior-on-repeated-commands) - [Cycle thirds on repeated Center Half commands](#cycle-thirds-on-repeated-center-half-commands) - [Resize on Directional Move](#resize-on-directional-move) - [Make the half actions tile like Windows or KDE](#make-the-half-actions-tile-like-windows-or-kde) - [Adjust macOS Ventura Stage Manager size](#adjust-macos-ventura-stage-manager-size) - [Enable Todo Mode](#enable-todo-mode) - [Only allow drag-to-snap when modifier keys are pressed](#only-allow-drag-to-snap-when-modifier-keys-are-pressed) - [Almost Maximize](#almost-maximize) - [Repeated Maximize restores the previous size and position](#repeated-maximize-restores-the-previous-size-and-position) - [Add an extra centering command with custom size](#add-an-extra-centering-command-with-custom-size) - [Add extra "ninths" sizing commands](#add-extra-ninths-sizing-commands) - [Add extra "eighths" sizing commands](#add-extra-eighths-sizing-commands) - [Add extra "full-height eighths" sizing commands](#add-extra-full-height-eighths-sizing-commands) - [Add extra "full-height sixths" sizing commands](#add-extra-full-height-sixths-sizing-commands) - [Add additional "thirds" sizing commands](#add-additional-thirds-sizing-commands) - [Add doubling/halving window sizing commands](#add-doublinghalving-window-sizing-commands) - [Add additional tiling and cascading commands](#add-additional-tiling-and-cascading-commands) - [Modify the "footprint" displayed for drag to snap area](#modify-the-footprint-displayed-for-drag-to-snap-area) - [Move Up/Down/Left/Right: Don't center on edge](#move-updownleftright-dont-center-on-edge) - [Make Smaller limits](#make-smaller-limits) - [Make Smaller/Make Larger size increments](#make-smallermake-larger-size-increments) - [Make Smaller/Make Larger "curtain resize" with gaps](#make-smallermake-larger-curtain-resize-with-gaps) - [Make Smaller/Make Larger width only](#make-smallermake-larger-width-only) - [Make Smaller/Make Larger height only](#make-smallermake-larger-height-only) - [Make Smaller shrink the height of full-height windows](#make-smaller-shrink-the-height-of-full-height-windows) - [Disabling window restore when moving windows](#disabling-window-restore-when-moving-windows) - [Changing the margin for the snap areas](#changing-the-margin-for-the-snap-areas) - [Setting gaps at the screen edges](#setting-gaps-at-the-screen-edges) - [Ignore specific drag to snap areas](#ignore-specific-drag-to-snap-areas) - [Disabling gaps when maximizing](#disabling-gaps-when-maximizing) - [Enabling snap areas for sixths](#enabling-snap-areas-for-sixths) - [Move cursor with window](#move-cursor-with-window) - [Control Enhanced UI handling](#control-enhanced-ui-handling) - [Prevent a window that is quickly dragged above the menu bar from going into Mission Control](#prevent-a-window-that-is-quickly-dragged-above-the-menu-bar-from-going-into-mission-control) - [Change the behavior of double-click window title bar](#change-the-behavior-of-double-click-window-title-bar) - [Change the order of displays to order by x coordinate](#change-the-order-of-displays-to-order-by-x-coordinate-for-next-and-prev-displays-commands) - [Keep window size when moving a maximized window to another display](#keep-window-size-when-moving-a-maximized-window-to-another-display) - [Repeat the last Rectangle action when moving to another display](#repeat-the-last-rectangle-action-when-moving-to-another-display) - [Offset cycling position when overlapping another window](#offset-cycling-position-when-overlapping-another-window) - [Move windows that can't fill the snap area to the edge](#move-windows-that-cant-fill-the-snap-area-to-the-edge) - [Apps using native resize during window animations](#apps-using-native-resize-during-window-animations) ## Keyboard Shortcuts If you wish to change the default shortcuts after first launch click "Restore Default Shortcuts" in the settings tab of the preferences window. Alternatively, you can set it with the following terminal command followed by app restart. True is for the recommended shortcuts, false is for Spectacle's. ```bash defaults write com.knollsoft.Rectangle alternateDefaultShortcuts -bool true ``` ## Adjust Behavior on Repeated Commands This is now in the preferences window, but there's an option in the preferences for "Move to adjacent display on repeated left or right commands". If this setting is not checked, then each time you execute a half or quarter action, the width of the window will cycle through the following sizes: 1/2 -> 2/3 -> 1/3. The cycling behavior can be disabled entirely with: ```bash defaults write com.knollsoft.Rectangle subsequentExecutionMode -int 2 ``` `subsequentExecutionMode` accepts the following values: 0: halves to thirds Spectacle behavior (box unchecked) 1: cycle displays (box checked) for left/right actions 2: disabled 3: cycle displays for left/right actions, halves to thirds for the rest (old Rectangle behavior) 4: repeat same action on next display ## Cycle thirds on repeated Center Half commands Set Center Half to cycle thirds sizes: 1/2 -> 2/3 -> 1/3 with: ```bash defaults write com.knollsoft.Rectangle centerHalfCycles -int 1 ``` ## Resize on Directional Move By default, the commands to move to certain edges will not resize the window. If `resizeOnDirectionalMove` is enabled, the _halves to thirds_ mode is instead used. This means that when moving to the left/right, the width will be changed, and when moving to the top/bottom, the height will be changed. This size will cycle between 1/2 -> 2/3 -> 1/3 of the screen’s width/height. Note that if subsequent execution mode is set to cycle displays when this is enabled, Move Left and Move Right will always resize to 1/2, and pressing it again will move to the next display. ```bash defaults write com.knollsoft.Rectangle resizeOnDirectionalMove -bool true ``` ## Make the half actions tile like Windows or KDE By default, Left Half, Right Half, Top Half and Bottom Half always give the window the full height or width of the screen. Enable this to have each of them only change its own axis and keep the other one, like the Win + arrow keys on Windows or keyboard tiling on KDE: - Left Half followed by Top Half puts the window in the top left quarter (so does Top Half followed by Left Half). - Inside a quarter, the action for the opposite edge expands the window along that axis: Bottom Half takes a top left quarter back to Left Half, Right Half takes it to Top Half. - Inside a quarter, the action for the edge the window is docked to cycles the window through the cycle sizes along that axis and keeps the other one: Left Half takes a top left quarter to two thirds wide, then one third wide, while Top Half does the same to its height. This follows the setting for repeated commands; when it does not resize, the window stays as it is. - The same goes for halves: Right Half followed by Left Half fills the screen. - Windows that are not tiled, and halves that get their own action again, behave as usual (repeated executions still cycle sizes or move across displays, depending on the setting for repeated commands). ```bash defaults write com.knollsoft.Rectangle halvesPreserveOtherAxisSize -bool true ``` ## Adjust macOS Ventura Stage Manager size By default, the Stage Manager area will be set to 190, if enabled. ```bash defaults write com.knollsoft.Rectangle stageSize -float ``` To set it to a proportion of your screen's width, set it to a value between 0 and 1. ```bash defaults write com.knollsoft.Rectangle stageSize -float ``` ## Enable Todo Mode See the [wiki](https://github.com/rxhanson/Rectangle/wiki/Todo-Mode) for more info. ```bash defaults write com.knollsoft.Rectangle todo -int 1 ``` ## Only allow drag-to-snap when modifier keys are pressed Modifier keys can be combined by adding the sum of Integer Values together. | Modifier Key | Integer Value | |--------------|---------------| | cmd | 1048576 | | option | 524288 | | ctrl | 262144 | | shift | 131072 | | fn | 8388608 | This command would be for restricting snap to the cmd key: ```bash defaults write com.knollsoft.Rectangle snapModifiers -int 1048576 ``` ## Almost Maximize By default, "Almost Maximize" will resize the window to 90% of the screen (width & height). ```bash defaults write com.knollsoft.Rectangle almostMaximizeHeight -float ``` ```bash defaults write com.knollsoft.Rectangle almostMaximizeWidth -float ``` ## Repeated Maximize restores the previous size and position By default, executing "Maximize" or "Almost Maximize" on a window that is already in that state does nothing. With this enabled, executing the same action again on a window that Rectangle has just maximized (or almost maximized) moves the window back to the size and position it had right before, so the shortcut toggles between the two. A window that was moved or resized by other means in between is maximized as usual. This can also be toggled with the "Repeated Maximize restores the previous size and position" checkbox at the bottom of the "Extras" popover in the General tab of the Settings window. ```bash defaults write com.knollsoft.Rectangle repeatedMaximizeRestoresPrevious -bool true ``` ## Add an extra centering command with custom size This extra command is not available in the UI. You'll need to know which keycode and modifier flags you want. ```bash defaults write com.knollsoft.Rectangle specified -dict-add keyCode -float 8 modifierFlags -float 1966080 ``` ```bash defaults write com.knollsoft.Rectangle specifiedHeight -float 1050 defaults write com.knollsoft.Rectangle specifiedWidth -float 1680 ``` ## Add an extra centering with prominence command There is an extra command that horizontally centers the window but moves up the window vertically slightly from the center to add visual weight. Similar to extra centering you will need to know which keycode and modifier flags you want. The key code is: * centerProminently For example, the command for setting the shortcut to `ctrl option command C` would be: ```bash defaults write com.knollsoft.Rectangle centerProminently -dict-add keyCode -float 8 modifierFlags -float 1835305 ``` ## Add extra "ninths" sizing commands Commands for resizing to screen ninths are not available in the UI. The key codes are: * topLeftNinth * topCenterNinth * topRightNinth * middleLeftNinth * middleCenterNinth * middleRightNinth * bottomLeftNinth * bottomCenterNinth * bottomRightNinth For example, the command for setting the top left ninth shortcut to `ctrl opt shift 1` would be: ```bash defaults write com.knollsoft.Rectangle topLeftNinth -dict-add keyCode -float 18 modifierFlags -float 917504 ``` ## Add extra "eighths" sizing commands Commands for resizing to screen eighths are not available in the UI. This divides the screen up into a 4x2 grid. The key codes are: * topLeftEighth * topCenterLeftEighth * topCenterRightEighth * topRightEighth * bottomLeftEighth * bottomCenterLeftEighth * bottomCenterRightEighth * bottomRightEighth For example, the command for setting the top left eighth shortcut to `ctrl opt shift 1` would be: ```bash defaults write com.knollsoft.Rectangle topLeftEighth -dict-add keyCode -float 18 modifierFlags -float 917504 ``` ## Add extra "full-height eighths" sizing commands These hidden commands divide a landscape display into 8 full-height vertical columns. On a portrait display, they automatically rotate into 8 horizontal rows. The key codes are: * firstVerticalEighth * secondVerticalEighth * thirdVerticalEighth * fourthVerticalEighth * fifthVerticalEighth * sixthVerticalEighth * seventhVerticalEighth * lastVerticalEighth For example, the command for setting the first vertical eighth shortcut to `ctrl opt shift 1` would be: ```bash defaults write com.knollsoft.Rectangle firstVerticalEighth -dict-add keyCode -float 18 modifierFlags -float 917504 ``` Repeating `firstVerticalEighth` cycles forward through all 8 positions. Repeating `lastVerticalEighth` cycles through them in reverse when repeated-command behavior is enabled. ## Add extra "full-height sixths" sizing commands These commands divide a landscape display into 6 full-height vertical columns. On a portrait display, they automatically rotate into 6 horizontal rows. They can be configured under the "Extra" section of the Shortcuts settings, or via CLI. The key codes are: * firstVerticalSixth * secondVerticalSixth * thirdVerticalSixth * fourthVerticalSixth * fifthVerticalSixth * lastVerticalSixth For example, the command for setting the first vertical sixth shortcut to `ctrl opt shift 1` would be: ```bash defaults write com.knollsoft.Rectangle firstVerticalSixth -dict-add keyCode -float 18 modifierFlags -float 917504 ``` Repeating `firstVerticalSixth` cycles forward through all 6 positions. Repeating `lastVerticalSixth` cycles through them in reverse when repeated-command behavior is enabled. ## Add additional "thirds" sizing commands These commands for resizing to corner two-thirds are not available in the UI but can be configured via CLI. The key codes are: * topLeftThird * topRightThird * bottomLeftThird * bottomRightThird (these correspond to two-thirds, and when repeated will cycle through each of the calculations) For example, the command for setting the top left two-thirds shortcut to `ctrl opt shift 1` would be: ```bash defaults write com.knollsoft.Rectangle topLeftThird -dict-add keyCode -float 18 modifierFlags -float 917504 ``` ## Add doubling/halving window sizing commands These commands for doubling/halving the window width/height are not available in the UI but can be configured via CLI. The key codes are: * doubleHeightUp * doubleHeightDown * doubleWidthLeft * doubleWidthRight * halveHeightUp * halveHeightDown * halveWidthLeft * halveWidthRight The action direction (e.g., "Right") is the direction that the center of the window will move towards as a result of resizing. For example, the command for setting the doubleWidthRight shortcut to `ctrl option shift right` would be: ```bash defaults write com.knollsoft.Rectangle doubleWidthRight -dict-add keyCode -float 124 modifierFlags -float 11403555 ``` ## Add additional tiling and cascading commands Commands for tiling and cascading the visible windows are not available in the UI but can be configured via CLI. The key codes are: * tileAll * cascadeAll * cascadeActiveApp * tileActiveApp _tileAll_ and _cascadeAll_ act on all visible windows. _cascadeActiveApp_ cascades and brings to the front only windows belonging to the currently active (foremost) app, leaving all other windows alone. _tileActiveApp_ tiles only windows belonging to the currently active (foremost) app into a grid, leaving all other windows alone. For example, the command for setting the cascadeActiveApp shortcut to `ctrl shift 2` would be: ```bash defaults write com.knollsoft.Rectangle cascadeActiveApp -dict-add keyCode -float 2 modifierFlags -float 393475 ``` ## Modify the "footprint" displayed for drag to snap area Adjust the alpha (transparency). Default is 0.3, or 0 for the blurred preview, where it controls tint opacity. ```bash defaults write com.knollsoft.Rectangle footprintAlpha -float ``` Change the border width. Default is 2 (used to be 1), or 1 for the blurred preview. A custom value overrides either default. ```bash defaults write com.knollsoft.Rectangle footprintBorderWidth -float ``` Disable the fade. ```bash defaults write com.knollsoft.Rectangle footprintFade -int 2 ``` Change the color. With blur enabled, this sets the tint color. Delete `footprintColor` to restore the automatic light/dark tint color. ```bash defaults write com.knollsoft.Rectangle footprintColor -string "{\"red\":0,\"blue\":0.5,\"green\":0.5}" ``` Change the animation duration. The value is a multiplier. Default is 0 (no movement animation). ```bash defaults write com.knollsoft.Rectangle footprintAnimationDurationMultiplier -float ``` ## Move Up/Down/Left/Right: Don't center on edge By default, the directional move will center the window along the edge that the window is being moved to. ```bash defaults write com.knollsoft.Rectangle centeredDirectionalMove -int 2 ``` ## Make Smaller limits By default, "Make Smaller" will decrease the window until it reaches 25% of the screen (width & height). Set either value to `0` to disable Rectangle's screen-relative limit for that dimension and rely on the application's native minimum size. ```bash defaults write com.knollsoft.Rectangle minimumWindowWidth -float ``` ```bash defaults write com.knollsoft.Rectangle minimumWindowHeight -float ``` ## Make Smaller/Make Larger size increments By default, "Make Smaller" and "Make Larger" change the window height/width by 30 pixels. ```bash defaults write com.knollsoft.Rectangle sizeOffset -float ``` ## Make Smaller/Make Larger "curtain resize" with gaps By default, windows touching the edge of the screen will keep those shared edges the same while only resizing the non-shared edge. With window gaps, this is a little ambiguous since the edges don't actually touch the screen, so you can disable it for traditional, floating resizing: ```bash defaults write com.knollsoft.Rectangle curtainChangeSize -int 2 ``` ## Make Smaller/Make Larger width only By default, "Make Smaller" and "Make Larger" change both, the window height and the window width. If you only want to change the window width without changing window height, configure shortcuts for the _largerWidth_ and _smallerWidth_ commands. For example, if you want to assign `ctrl option ]` to _largerWidth_ and `ctrl option [` to _smallerWidth_, the commands would be: ```bash 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 ``` ## Make Smaller/Make Larger height only Similarly, if you only want to change the window height without changing window width, configure shortcuts for the _largerHeight_ and _smallerHeight_ commands. For example, if you want to assign `ctrl option shift ]` to _largerHeight_ and `ctrl option shift [` to _smallerHeight_, the commands would be: ```bash 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 ``` ## Make Smaller shrink the height of full-height windows By default, "Make Smaller" keeps the height of a window that spans the full height of the screen (for example after "Half" or "Maximize Height") and only shrinks its width. Enable this to shrink the height as well: ```bash defaults write com.knollsoft.Rectangle smallerShrinksMaximizedHeight -bool true ``` ## Disabling window restore when moving windows ```bash defaults write com.knollsoft.Rectangle unsnapRestore -int 2 ``` ## Disabling window restore when moving windows sized by "Make Smaller" or "Make Larger" Keeps the window restore behavior above for everything else: ```bash defaults write com.knollsoft.Rectangle unsnapRestoreFromSizeChange -int 2 ``` ## Changing the margin for the snap areas Each margin is configured separately, and has a default value of 5 ```bash defaults write com.knollsoft.Rectangle snapEdgeMarginTop -int 10 defaults write com.knollsoft.Rectangle snapEdgeMarginBottom -int 10 defaults write com.knollsoft.Rectangle snapEdgeMarginLeft -int 10 defaults write com.knollsoft.Rectangle snapEdgeMarginRight -int 10 ``` ## Snapping before reaching screen edges The “Snap before reaching screen edges” toggle sets `snapBeforeReachingEdges` to 20 points when enabled and 0 when disabled. A custom distance can be set with: ```bash defaults write com.knollsoft.Rectangle snapBeforeReachingEdges -float 30 ``` Restart Rectangle after changing the value. A positive distance overrides the `snapEdgeMargin` values on exposed outer edges, even when those margins are larger. Shared display boundaries and corner targets retain their existing margins. Set the distance to 0 to return to the configured edge margins. ## Setting gaps at the screen edges You can specify gaps at the edges of your screen that will be left uncovered by window resizing operations. This is useful if, for example, you use a dock replacement that should not have windows overlapping it. ```bash 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 ``` You can also separately specify the gap for a screen with a notch. Useful for multi display setups if you are using a menubar replacement. When this is set, it replaces `screenEdgeGapTop` on screens with a notch, so a value of `0` removes the top gap on those screens. ```bash defaults write com.knollsoft.Rectangle screenEdgeGapTopNotch -int 5 ``` To go back to using `screenEdgeGapTop` on screens with a notch: ```bash defaults delete com.knollsoft.Rectangle screenEdgeGapTopNotch ``` If you want these gaps to be applied on your main screen only you can set screenEdgeGapsOnMainScreenOnly. Useful for multi display setups where only one screen has some dock replacement. ```bash defaults write com.knollsoft.Rectangle screenEdgeGapsOnMainScreenOnly -bool true ``` ## Ignore specific drag to snap areas Each drag to snap area on the edge of a screen can be ignored with a single Terminal command, but it's a bit field setting so you'll have to determine the bit field for which ones you want to disable. | Bit | Snap Area | Window Action | |-----|---------------------------|---------------------| | 0 | Top | Maximize | | 1 | Bottom | Thirds | | 2 | Left | Left Half | | 3 | Right | Right Half | | 4 | Top Left | Top Left Corner | | 5 | Top Right | Top Right Corner | | 6 | Bottom Left | Bottom Left Corner | | 7 | Bottom Right | Bottom Right Corner | | 8 | Top Left Below Corner | Top Half | | 9 | Top Right Below Corner | Top Half | | 10 | Bottom Left Above Corner | Bottom Half | | 11 | Bottom Right Above Corner | Bottom Half | To disable the top (maximize) snap area, execute: ```bash defaults write com.knollsoft.Rectangle ignoredSnapAreas -int 1 ``` To disable the Top Half and Bottom Half snap areas, the bit field would be 1111 0000 0000, or 3840 ```bash defaults write com.knollsoft.Rectangle ignoredSnapAreas -int 3840 ``` ## Disabling gaps when maximizing By default, the "Gaps between windows" setting applies to "Maximize" and "Maximize Height". To disable the gaps for "Maximize", execute: ```bash defaults write com.knollsoft.Rectangle applyGapsToMaximize -int 2 ``` To disable the gaps for "Maximize Height", execute: ```bash defaults write com.knollsoft.Rectangle applyGapsToMaximizeHeight -int 2 ``` ## Enabling snap areas for sixths To enable snap areas for sixths corners, execute: ```bash defaults write com.knollsoft.Rectangle sixthsSnapArea -bool true ``` Once enabled, you can drag a window to the corner, then move it along the edge towards the thirds area to snap to a sixth. ## Move cursor with window There's an option in the UI for moving the cursor with the window when going across displays, but here's an option for moving it with any shortcut: ```bash defaults write com.knollsoft.Rectangle moveCursor -int 1 ``` ## Control Enhanced UI handling Some apps enable the macOS `AXEnhancedUserInterface` accessibility mode. Rectangle disables this mode while moving or resizing a window because its animated window updates can otherwise produce incorrect frames. Chromium browsers can also enable expensive web accessibility processing when the mode is restored. Rectangle uses automatic handling by default: it restores Enhanced UI for other apps, but leaves it disabled after Rectangle window actions, when known Chromium browser families activate, and when one is already frontmost as Rectangle starts. VoiceOver and Switch Control keep the prior restore behavior. The behavior can be overridden with: ```bash defaults write com.knollsoft.Rectangle enhancedUI -int ``` `enhancedUI` accepts the following values: | Mode | Behavior | |------|----------| | `1` | Always restore Enhanced UI after a Rectangle window action if it was enabled beforehand. Use this when assistive software depends on the mode. | | `2` | Disable Enhanced UI when encountered and do not restore it. | | `3` | Behave like mode 2 and also disable Enhanced UI whenever the frontmost app changes. | | `4` | Automatic handling (default). | Automatic handling can still interfere with third-party assistive software that enables Enhanced UI inside a Chromium browser; use mode 1 when that software depends on the mode. Modes 2 and 3 apply the same risk to every app. Legacy mode `0` is treated as mode 1. ## Prevent a window that is quickly dragged above the menu bar from going into Mission Control Important: This can cause issues with dragging and dropping in certain apps like Adobe Illustrator, and can affect text selection in a select few apps as well. Windows that are slowly moved above the menu bar will still go into Mission Control. Once this is enabled, the checkbox for it is visible in the Snap Areas tab of the Preferences window. ```bash defaults write com.knollsoft.Rectangle missionControlDragging -int 2 ``` Change the allowed off-screen distance. The value is in pixels and is tied to the speed. Default is 25. ```bash defaults write com.knollsoft.Rectangle missionControlDraggingAllowedOffscreenDistance -float ``` Change the disallowed duration. The value is in milliseconds. Default is 250. ```bash defaults write com.knollsoft.Rectangle missionControlDraggingDisallowedDuration -int ``` ## Change the behavior of double-click window title bar To change the action ([list](https://github.com/rxhanson/Rectangle/blob/master/Rectangle/WindowAction.swift)): ```bash defaults write com.knollsoft.Rectangle doubleClickTitleBar -int ``` To disable restore when double-clicked again: ```bash defaults write com.knollsoft.Rectangle doubleClickTitleBarRestore -int 2 ``` To disable double-click window title bar only for specific bundle ids (in example, Outlook): ```bash defaults write com.knollsoft.Rectangle doubleClickTitleBarIgnoredApps -string "[\"com.microsoft.Outlook\"]" ``` ## Change the order of displays to order by x coordinate for next and prev displays commands By default, display order is left-to-right, line-by-line. You can change this to be ordered by x coordinate, left-to-right, regardless of which vertical position of the display. This was the default behavior prior to v0.87. ```bash defaults write com.knollsoft.Rectangle screensOrderedByX -int 1 ``` ## Keep window size when moving a maximized window to another display By default, moving a maximized window to the next or previous display re-maximizes it to fill the destination display. Disable this to keep the window's size and center it on the destination display instead (so a window maximized on a smaller display won't grow to fill a larger one). This can also be toggled from Settings via the "Maximize window when moved to another display" checkbox. ```bash defaults write com.knollsoft.Rectangle autoMaximize -int 2 ``` To restore the default behavior: ```bash defaults write com.knollsoft.Rectangle autoMaximize -int 0 ``` ## Repeat the last Rectangle action when moving to another display By default, moving a window to the next, previous, or a specific display keeps the spot it had on the source display (Settings > Behavior > "Keep window position when moving across displays"). Enable this to replay the last Rectangle action on the destination display instead, when there is one: a window that was snapped to the left half of the source display is snapped to the left half of the destination display, so it is resized to match the new display rather than keeping its size. With "Keep window position" turned off, a window with no action to replay is mapped proportionally from the source display to the destination display instead of being centered. This is off by default. ```bash defaults write com.knollsoft.Rectangle attemptMatchOnNextPrevDisplay -int 1 ``` To disable it again: ```bash defaults write com.knollsoft.Rectangle attemptMatchOnNextPrevDisplay -int 2 ``` ## Offset cycling position when overlapping another window When cycling through grid positions (sixths, eighths, ninths, twelfths, sixteenths, or quarters with quadrant cycling mode), the target position may land exactly on top of another window, hiding it completely. Enable this to apply a small offset when an overlap is detected, so you can see there's a window underneath. ```bash defaults write com.knollsoft.Rectangle cyclingOverlapOffset -bool true ``` The default offset is 11pt. To customize the offset size: ```bash defaults write com.knollsoft.Rectangle cyclingOverlapOffsetSize -float 16 ``` By default, only one cascade layer is shown (the original window plus one offset). To allow more layers: ```bash defaults write com.knollsoft.Rectangle cyclingOverlapMaxCascade -int 3 ``` ## Show a badge with the stacked windows when hovering over a grid corner When multiple windows are stacked at the same grid position, resting the cursor on that position's top-left corner shows a small badge with the stack count and a list of the window names. Clicking a name brings that window forward. ```bash defaults write com.knollsoft.Rectangle stackBadge -bool true ``` ## Move windows that can't fill the snap area to the edge Some windows can't be resized to fill a snap area — either because they're a fixed size, or because they're resizable but have a maximum size or a fixed aspect ratio (FaceTime is a common example). By default such a window aligns to the snap area's screen edge(s): a right-half snap anchors flush right, a corner snap anchors into the corner, and the window stays centered on any axis it can't fill. To choose a different behavior: ```bash defaults write com.knollsoft.Rectangle moveFixedSizeToEdge -int 1 # align edges and corners (default) defaults write com.knollsoft.Rectangle moveFixedSizeToEdge -int 2 # align corners only, center halves/sides defaults write com.knollsoft.Rectangle moveFixedSizeToEdge -int 3 # center within the snap area defaults write com.knollsoft.Rectangle moveFixedSizeToEdge -int 4 # keep windows at the snap area's top-left ``` Mode `4` keeps constrained windows at the snap area's top-left. For video windows such as IINA, this keeps left/right snaps top-aligned as you cycle through sizes. Narrower windows stay at the snap area's left edge, even for right-side snaps. Gaps still apply, and Rectangle may shift the window to keep it on screen. Restart Rectangle after changing this preference. To restore the default: ```bash defaults delete com.knollsoft.Rectangle moveFixedSizeToEdge ``` ## Apps using native resize during window animations Certain applications (such as IINA) enforce aspect ratios or custom constraints asynchronously when resized. During direct window animations, continuous intermediate frame adjustments can fight with the application's internal aspect-ratio corrections. For apps in this list, Rectangle resizes the window once natively, allows the animation duration for the app to asynchronously settle its aspect ratio, and then aligns the final achieved size using a position-only write. The default list contains IINA (`com.colliderli.iina`). You can configure this list of bundle IDs: ```bash defaults write com.knollsoft.Rectangle directAnimationNativeResizeApps -string "[\"com.colliderli.iina\", \"org.videolan.vlc\"]" ```