# Make Mac apps behave the way you expect

> Make each Mac app quit, close and handle its windows the way you expect.

- Canonical URL: https://getedith.pro/extensions/app-behavior
- Category: [Mac Utilities](https://getedith.pro/extensions/category/mac-utilities)
- Extension ID: `appBehavior`
- Updated: 2026-11-28
- Part of: [Edith](https://getedith.pro/), a Mac app for macOS 14 or later on Apple silicon, [$35 once for one Mac, plus $7 for each additional Mac](https://getedith.pro/pricing)

App Behavior is an Edith extension that fixes how Mac apps and windows behave. Each fix is off until you turn it on, and app rules apply only to the apps you add.

## Overview

On a Mac, closing the last window of an app leaves the app running. Add an app to App Behavior and it quits a moment after its last window closes, the way it would on Windows. Opening a new window in that moment keeps it running, and documents with unsaved changes still ask to save.

Command Q sits right next to Command W, so it is easy to quit an app by mistake. For the apps you choose, Command Q, and Command W if you like, can need a short hold with a ring that fills up, a second press, or an extra key. It never gets in the way while a password field has secure input on.

The green button can fill the visible screen instead of opening a new Space, with Option click still going full screen. Clicking the Dock icon of the app already in front can minimize it, hide it or bring its next window forward. You can also stop macOS reordering Spaces by recent use, and drag any window from anywhere while holding a few modifier keys.

## How to make a Mac app quit when its last window closes

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 you can do

- **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.

## Can a Mac quit an app when its last window closes?

Not for most apps. macOS keeps apps running after their last window closes unless the developer chose otherwise. App Behavior lets you choose for each app, and adds a grace period so a new window keeps it open.

## Use cases

### Apps that should quit like on Windows

Add Preview or a chat app and it quits shortly after you close its last window, so it stops sitting in the Dock and using memory.

### No more accidental quits

Make Command Q in your browser need a hold, so reaching for Command W never closes every tab again.

### Big windows without full screen

Click the green button to fill the screen while keeping the menu bar, the Dock and your other windows one click away.

## Command line and MCP

```sh
ed invoke appBehavior appBehavior.status --json '{}'
ed invoke appBehavior appBehavior.rules.set --json '{"rule":{"bundleID":"com.example.editor","quitProtection":"hold"}}'
ed invoke appBehavior appBehavior.feature --json '{"feature":"greenButton","enabled":true}'
ed invoke appBehavior appBehavior.zoom --json '{}'
```

## Permissions

- 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.

## Requirements

- macOS 14 or later on Apple silicon
- Edith running

## FAQ

### 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.

## Works well with

- [Mac Window Tiling: Snap Windows With Keys or Drag](https://getedith.pro/extensions/window-tiling): Snap windows into halves, zones and saved workspaces from the keyboard or by dragging.
- [Mac Window Switcher: Switch Windows, Not Just Apps](https://getedith.pro/extensions/window-switcher): Switch between windows, not just apps.
- [See Running Apps and Their Memory Use on Mac](https://getedith.pro/extensions/running-apps): See what is running, in apps and in the background, and stop what you do not need.

## 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
