[English] | 简体中文
Quitty is a lightweight, modern macOS utility that automatically terminates applications when their last window is closed. It is designed to be a robust, high-performance, and macOS Tahoe-compatible alternative to older tools like SwiftQuit.
- Automatic Termination: Quits apps instantly (or with a delay) when you close their last window.
- macOS Tahoe Ready: Uses raw Accessibility API (
AXObserver) for maximum compatibility with macOS 16. - Smart Filtering:
- Include Mode: Only quit applications in your specific list.
- Exclude Mode: Quit all applications except for those you want to keep running.
- Configurable Delay: Set a custom grace period (0-5 seconds) before an app is terminated.
- Launch at Login: Seamlessly starts with your Mac.
- Adaptive Learning Engine: Quitty learns from your feedback. If an app stays open or quits incorrectly, you can report it to help the engine adapt to that app's specific window behavior.
- iCloud Sync: Automatically sync your settings and learned app rules across all your Macs via your iCloud account.
- Crowdsourced Improvement: Optionally report issues to contribute to a better universal detection engine for all users.
Download the latest version as a DMG file from the Releases Page.
Simply open Quitty.dmg and drag Quitty to your Applications folder.
You can also build and install Quitty directly from source using the provided script.
- Clone this repository to your local machine.
- Open Terminal and navigate to the project directory.
- Run the installation script:
chmod +x build_and_install.sh ./build_and_install.sh
- The script will compile the project in Release mode and install
Quitty.appto your/Applicationsfolder.
Quitty requires Accessibility Permissions to monitor window events across other applications.
- Upon first launch, Quitty will prompt you to grant access.
- Go to
System Settings > Privacy & Security > Accessibilityand ensure Quitty is enabled. - If the engine doesn't start, use the Run Diagnostic button in the Troubleshooting tab.
Open the Settings window from the menu bar icon (the "X" icon).
- General: Toggle "Launch at Login" and adjust the "Quit Delay".
- App List:
- Choose between Include Mode (Quit Only These) or Exclude Mode (Quit All Except These).
- Add apps by clicking the
+button and selecting them from your Applications folder.
- Data: Enable "File Sync" to keep your app list and settings in a JSON file on your iCloud Drive or Dropbox.
Unlike some tools that rely on high-level frameworks which broke in recent macOS updates, Quitty uses a direct approach:
- It monitors
NSWorkspacenotifications for app launches and terminations. - For each target app, it attaches a raw C-based
AXObserverto the process. - It listens for the
AXWindowClosednotification. - When triggered, it performs a non-blocking check of the app's current window list.
- If the count is zero (excluding drawers and sheets), it checks against a learned ghost size list and an adaptive sensitivity multiplier derived from your feedback.
- If both checks pass, it schedules a termination via
NSRunningApplication.terminate().
- System Apps: Quitty is hard-coded to ignore critical system processes (Finder, Dock, Spotlight, Control Center, etc.) to ensure system stability.
- Safety First: If the Accessibility API fails to return a valid window count, Quitty will abort the quit process rather than risk "killing" an app that might still have active windows.
- Development Tools: It is recommended to add IDEs (like Xcode, VS Code) to the exclusion list to prevent unexpected closures during compilation or background tasks.
Due to macOS security mechanisms and the fact that each app may use its own window management and technical implementation, Quitty cannot guarantee to fully quit every application in all scenarios. We always follow a conservative principle to avoid quitting apps that are still in use, but 100% accuracy cannot be guaranteed. If you encounter apps that cannot be quit or are quit incorrectly, please submit an issue (submit here) and I will try to investigate when possible. Thank you for your understanding and support!
This project is provided "as is" under the MIT License.