# App Behavior

> App Behavior documentation for Edith on Mac. Make each Mac app quit, close and handle its windows the way you expect.

- Canonical URL: https://getedith.pro/docs/extensions/app-behavior
- Updated: 2026-12-02

Quit chosen apps when their last window closes, make Command Q need a hold or a second press, let the green button fill the screen, minimize the front app from the Dock, keep Spaces in order and drag windows from anywhere.

![App Behavior in Edith with the green button filling the screen, Dock clicks minimizing the front app, and app rules for Safari, Terminal and TextEdit](shot:ext-appBehavior)

## Install App Behavior

1. Open **Library** in Edith's sidebar.
2. Search for App Behavior in **Search tools**, or open the **Mac Utilities** category.
3. Press **Install**. App Behavior is added to your sidebar.

From the terminal, `ed extensions install appBehavior` does the same. See [Extensions](https://getedith.pro/docs/extensions) for turning extensions off, updating and removing them.

## Where to find App Behavior

- **Sidebar.** Click App Behavior in the sidebar to open its page, or press <kbd>⌘</kbd><kbd>K</kbd> and type its name.
- **Home.** Open **Home**, press **Edit Home**, then **Add widgets** to place its widgets.

## Get started with App Behavior

1. **Allow Accessibility.** App Behavior sees which button or Dock icon you click and moves windows through Accessibility. It never records what you type.
2. **Add an app.** Pick a running app and choose whether it quits after its last window and how Command Q and Command W are guarded.
3. **Turn on window fixes.** The green button fills the screen without a new Space, and clicking the front app in the Dock minimizes it.
4. **Grab and move.** Hold the modifier keys and drag anywhere in a window to move it, or right drag to resize it.

## What App Behavior does

- **Quit on last window.** Chosen apps quit soon after their last window closes. Unsaved documents still ask to save.
- **Quit and close protection.** Command Q and Command W need a hold, a second press or an extra key in chosen apps.
- **Green button fills the screen.** The green button fills the visible screen without a new Space. Option click keeps full screen.
- **Dock clicks.** Clicking the Dock icon of the app in front minimizes it, hides it or cycles its windows.
- **Fixed Spaces order.** Stops macOS reordering Spaces by recent use, and puts the old setting back when off.
- **Grab and move.** Hold modifier keys and drag anywhere in a window to move it, or right drag to resize it.

## Settings

Open App Behavior from the sidebar and press **Settings** at the top right of its page. You can also select App Behavior in **Library** and press **Settings**, or press <kbd>⌥</kbd><kbd>⌘</kbd><kbd>,</kbd> while its page is open.

From the terminal, read a setting with `ed config get <key>` and change it with `ed config set <key> <value>`, using the key in the last column. See [ed config](https://getedith.pro/docs/cli/config).

### Quit on last window

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Wait before quitting**<br>How long an app waits after its last window closes. Opening a window in that time keeps it running. | 3 seconds | 1 to 30 seconds | `appBehaviorQuitGrace` |

### Quit and close protection

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Hold for**<br>How long to hold Command Q or Command W in apps that need a hold. | 800 ms | 300 to 3000 ms | `appBehaviorHoldMilliseconds` |
| **Second press within**<br>How quickly the second press must follow in apps that need two presses. | 500 ms | 200 to 1500 ms | `appBehaviorDoublePressMilliseconds` |
| **Extra key**<br>The key to add to Command Q or Command W in apps that need an extra key. | Option | Option, Shift, Control | `appBehaviorProtectionModifier` |

### Windows

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Green button fills the screen**<br>Clicking the green button fills the visible screen without a new Space. Option click still goes full screen. | Off | On, Off | `appBehaviorGreenButton` |
| **Grab and move windows**<br>Hold the modifier keys and drag anywhere in a window to move it. Right drag, or add Shift, to resize. Turn off the same option in Window Tiling so only one acts. | Off | On, Off | `appBehaviorGrab` |
| **Modifier keys** | Control Command | Control Command, Control Option, Option Command, Control Option Command | `appBehaviorGrabModifier` |

### Dock

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Change Dock clicks on the front app**<br>Clicking the Dock icon of the app already in front does something instead of nothing. | Off | On, Off | `appBehaviorDockClicks` |
| **Clicking it** | Minimizes | Minimizes, Hides, Cycles windows | `appBehaviorDockAction` |

### Spaces

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Keep Spaces in a fixed order**<br>macOS stops rearranging Spaces by recent use. The Dock restarts once, and turning it off puts the previous setting back. | Off | On, Off | `appBehaviorFixedSpaces` |

## From the terminal

Everything above works in the app. The `ed` command line is optional, for scripts and coding agents. App Behavior's commands are in [`ed app-behavior`](https://getedith.pro/docs/cli/app-behavior), and each one is also a tool in [Edith's MCP server](https://getedith.pro/docs/mcp).

## Permissions and requirements

- macOS 14 or later on Apple silicon
- Edith running
- Accessibility, to see which button or Dock icon you click, to move windows and to catch Command Q in the apps you protect. Edith never records what you type.

See [Permissions](https://getedith.pro/docs/permissions) for how Edith asks for each one.

## Questions

### Will I lose unsaved work?

No. App Behavior asks the app to quit the normal way, so any document with unsaved changes shows its usual save prompt.

### What happens to Spaces when I turn the fixed order off?

The setting goes back to exactly what it was before you turned it on, and the Dock restarts once so macOS picks it up.

### Does it work in password fields?

Yes. While secure input is on, Command Q and Command W work exactly as macOS normally handles them.

### Can I control it from the terminal?

Yes. ed invoke appBehavior appBehavior.status shows every rule, and appBehavior.rules.set adds or changes a rule for one app.

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
