Skip to content
Edith

App Behavior

Make Mac apps behave the way you expect

Choose, app by app, how quitting, closing and windows work, without changing anything for the apps you leave alone.

Mac Utilities
Get Edith for $35
ed extensions install appBehavior

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.

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.

Updated

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

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

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

    Grab and move

    Hold the modifier keys and drag anywhere in a window to move it, or right drag to resize it.

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

Does macOS do this already?

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.

From the terminal and your coding agents

Every example returns JSON with --json, and agents can call the same thing over MCP.

Terminal
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 and requirements

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

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

More in Mac Utilities

Keep AwakeStop your Mac and display from going to sleep while you work.Audio DevicesChoose where sound plays, and keep it there.⌃⌥⌘OMic MuteMute every microphone on your Mac with one shortcut.⇧⌘MPresenterBlur private details and draw on your screen while you present.⌥⇧⌘PMenu Bar StatsSee how busy your Mac is, right in the menu bar.HomebrewInstall, update and remove Homebrew packages without the terminal.Cursor PacksGive your Mac a new pointer in one click.Messaging DownloadsKeep WhatsApp, Telegram and Signal files from piling up in Downloads.Voice TypeHold a key, speak, and your words appear wherever you type.⌃⌥DText GrabCopy text you can see but cannot select.⌃⌥⌘THyper KeyTurn Caps Lock into a power key and remap keys without extra drivers.Finder PlusCut and paste files, rename in bulk and create new files right in Finder.⌃⌥⌘NQuick TogglesOne tap for the switches and actions macOS hides in menus and Terminal.DisplaysEvery display's brightness, sound and input in one place.Window SwitcherSwitch between windows, not just apps.⌥TABWhat's Using ThisFind out what keeps a disk from ejecting, then let it go.Default AppsChoose which app opens what, in one table.Window TilingSnap windows into halves, zones and saved workspaces from the keyboard or by dragging.⌃⌥LNotch PetA small animated friend beside the notch that reacts to your Mac.Menu Bar StylesColour, glass and island shapes behind the see-through menu bar.Cursor EffectsTrails, click ripples and a spotlight that follow your pointer.⌃⌥SSound PacksGive every key press, click and alert a sound of its own.CalendarYour next meetings at a glance, with one-click join.⌃⌥⌘JRunning AppsSee what is running, in apps and in the background, and stop what you do not need.Keyboard CleanLock the keyboard and clean your keys without typing anything.CleanerUnderstand your storage. Choose what goes.App UpdatesKeep your apps current and remove them cleanly.Lid AwakeKeep your Mac running with the lid closed.Radial MenuA pie menu around the pointer for the things you do all day.⌃⌥SpaceNetworkSee what the network is doing, right now and over the day.Mouse TunerMake a third-party mouse feel right on a Mac.ScratchpadQuick notes that are always one shortcut away.⌥⌘NSystem HealthWatch how your Mac is doing and hear about it before it becomes a problem.Input SwitchEach app keeps its own keyboard language, like on Windows.⌃⌥⌘IPower TimerSleep, shut down or restart later, or when something finishes.Battery CareKeep the battery healthy while the Mac stays plugged in.ChimeRemember what comes next.KeytrailFind and run any menu command without leaving the keyboard.⌃⌥⌘GDesk LoomPut every window back where it belongs.SwitchyardLet familiar events start a useful sequence.WaylineSend files and text to nearby phones and computers running LocalSend.LonghandType a snippet keyword and get the full text, in any app.SpanwellMeasure an image and bring the dimensions into your next change.⌃⌥⌘UCrosswaySend each link to the right browser.