Prevent accidental app quits by requiring long-press on ⌘Q
Features • Installation • Usage • Configuration • Building • License
- 🛡️ Prevent Accidental Quits - Require holding ⌘Q to quit apps
- ⏱️ Customizable Duration - Adjust hold time from 0.3s to 3.0s
- 📋 App Whitelist - Exclude specific apps that can quit immediately
- 🌐 Multi-language Support - English, Chinese, Japanese, Russian
- 🎨 Native macOS Design - Seamless integration with system UI
- 💾 Persistent Settings - Configuration saved to JSON file
- macOS 14.0 (Sonoma) or later
- Accessibility permission required
- Download the latest release from Releases
- Open the DMG file
- Drag
SlowQuitApps.appto theApplicationsfolder - Open the app and grant Accessibility permission
git clone https://github.com/030201xz/slow-quit-apps.git
cd slow-quit-apps
./build.sh-
Grant Accessibility Permission
- Open the app → System Settings will open automatically
- Navigate to: Privacy & Security → Accessibility
- Toggle SlowQuitApps to ON
- Click Restart App in the settings window
-
Configure Settings
- Right-click the menu bar icon → Settings
- Adjust hold duration as needed
- Add apps to whitelist if desired
| Action | Result |
|---|---|
| Press ⌘Q briefly | Nothing happens (quit cancelled) |
| Hold ⌘Q for configured duration | App quits |
| Release ⌘Q early | Quit cancelled, progress resets |
| ⌘Q on whitelisted app | Quits immediately |
Configuration is stored at:
~/Library/Application Support/SlowQuitApps/config.json
| Setting | Description | Default |
|---|---|---|
isEnabled |
Enable/disable the feature | true |
holdDuration |
Time to hold ⌘Q (seconds) | 1.0 |
launchAtLogin |
Start app on login | false |
showProgressAnimation |
Show progress ring | true |
language |
UI language | en |
excludedApps |
Whitelisted apps | System defaults |
| Code | Language |
|---|---|
en |
English |
zh-CN |
简体中文 |
ja |
日本語 |
ru |
Русский |
- Xcode 16.0+ or Swift 6.0+
- macOS 14.0+
# Development build
swift build
# Release build with DMG
./build.sh
# Generate app icon
swift scripts/generate-icon.swiftslow-quit-apps/
├── Sources/SlowQuitApps/
│ ├── App/ # Application entry point
│ ├── Core/ # Core functionality
│ │ ├── Accessibility/ # Permission management
│ │ └── QuitHandler/ # Quit progress UI
│ ├── Features/ # Feature modules
│ │ └── Settings/ # Settings window
│ ├── Models/ # Data models
│ ├── State/ # App state management
│ ├── Utils/ # Utilities
│ │ └── I18n/ # Internationalization
│ └── Resources/ # Locale files
├── Resources/ # App icon, docs
└── scripts/ # Build scripts
This happens with ad-hoc signing. The build script includes a self-signed certificate mechanism to prevent this. Run:
./build.shThe first run will create a persistent signing certificate.
- Check Accessibility permission is granted
- Click Restart App in settings
- Ensure the target app is not in the whitelist
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - See LICENSE for details.
Made with ❤️ for macOS