Skip to content
Edith

Docs

Mac Utilities

App Behavior

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

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 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 ⌘K 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 ⌥⌘, 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.

Quit on last window

Setting Default Values Key
Wait before quitting
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
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
How quickly the second press must follow in apps that need two presses.
500 ms 200 to 1500 ms appBehaviorDoublePressMilliseconds
Extra key
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
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
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
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
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, and each one is also a tool in Edith's MCP server.

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