Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.rectangle.enable

Whether to enable Rectangle window manager.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.rectangle.package

The rectangle package to use.

Type: null or package

Default:

pkgs.rectangle

Declared by:

programs.rectangle.defaults

Rectangle application defaults. Each attribute name is written as a native macOS preference key in Rectangle’s plist file.

Written to ~/Library/Preferences/com.knollsoft.Rectangle.plist.

See https://github.com/rxhanson/Rectangle for the available settings and their corresponding preference keys.

Type: attribute set of anything

Default:

{ }

Example:

{
  almostMaximizeHeight = 0.9;
  almostMaximizeWidth = 0.9;
  gapSize = 8.0;
  launchOnLogin = true;
  windowSnapping = 1;
}

Declared by:

programs.rectangle.shortcuts

Rectangle keyboard shortcuts. Attribute names are Rectangle action identifiers (e.g. leftHalf, rightHalf, maximize). Each value specifies a keyCode (macOS virtual key code) and a modifierFlags string naming the modifier combination (e.g. "ctrl+option+command").

You can determine keycodes using an app like: https://manytricks.com/keycodes/

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  bottomHalf = {
    keyCode = 125;
    modifierFlags = "ctrl+option+command";
  };
  center = {
    keyCode = 8;
    modifierFlags = "ctrl+option+command";
  };
  leftHalf = {
    keyCode = 123;
    modifierFlags = "ctrl+option+command";
  };
  maximize = {
    keyCode = 46;
    modifierFlags = "ctrl+option+command";
  };
  rightHalf = {
    keyCode = 124;
    modifierFlags = "ctrl+option+command";
  };
  topHalf = {
    keyCode = 126;
    modifierFlags = "ctrl+option+command";
  };
}

Declared by:

programs.rectangle.shortcuts.<name>.keyCode

macOS virtual key code for this shortcut.

Type: signed integer

Declared by:

programs.rectangle.shortcuts.<name>.modifierFlags

Modifier key combination for this shortcut. One of:

  • "shift" (⇧)
  • "ctrl" (⌃)
  • "option" (⌥)
  • "ctrl+option" (⌃⌥)
  • "ctrl+option+shift" (⌃⌥⇧)
  • "command" (⌘)
  • "shift+command" (⇧⌘)
  • "ctrl+option+command" (⌃⌥⌘)
  • "ctrl+option+shift+command" (⌃⌥⇧⌘)

Type: signed integer or (one of “command”, “ctrl”, “ctrl+option”, “ctrl+option+command”, “ctrl+option+shift”, “ctrl+option+shift+command”, “option”, “shift”, “shift+command”) convertible to it

Declared by: