KeepAwake is a small macOS menu bar utility that prevents your Mac from going to
sleep. It wraps the built-in caffeinate tool in a clean SwiftUI interface, with
quick timers, global keyboard shortcuts, and launch-at-login support.
- One-click toggle — keep your Mac awake indefinitely from the menu bar.
- Quick timers — 30 min, 1 h, 2 h, 4 h, and 8 h presets, plus a custom timer.
- Live countdown — see the remaining time and a progress bar while a timer runs.
- Dynamic menu bar icon — moon when inactive, sun when always-on, timer when counting down.
- Global keyboard shortcuts — toggle and start timers without opening the menu.
- Configurable sleep behavior — prevent display sleep, system sleep, or both.
- Launch at login — optionally start KeepAwake automatically (via
SMAppService). - Native & lightweight — SwiftUI, no third-party background daemons.
| Menu bar | Timer active | Preferences |
|---|---|---|
![]() |
![]() |
![]() |
| Action | Default shortcut |
|---|---|
| Toggle Keep Awake | ⌘ ⌥ Space |
| Start 30-minute timer | unset — configure in Preferences |
| Start 1-hour timer | unset — configure in Preferences |
| Start 2-hour timer | unset — configure in Preferences |
| Start 4-hour timer | unset — configure in Preferences |
Shortcuts are powered by sindresorhus/KeyboardShortcuts and can be customized in Preferences.
KeepAwake launches the system /usr/bin/caffeinate tool with flags derived from
your preferences:
-d— prevent the display from sleeping-i— prevent the system from idle-sleeping
When you stop or a timer expires, the caffeinate process is terminated and your
Mac returns to its normal sleep behavior.
- macOS 26.0 (Tahoe) or later — the UI uses the system Liquid Glass effects
- Apple silicon or Intel
- Xcode 26+ (only needed to build from source)
- Download
KeepAwake.zipfrom the latest release and unzip it. - Move KeepAwake.app to your
/Applicationsfolder.
KeepAwake is not signed with an Apple Developer ID or notarized, so macOS Gatekeeper quarantines it on first launch. To allow it to run, remove the quarantine attribute with a single command:
xattr -dr com.apple.quarantine /Applications/KeepAwake.appThen open the app normally. (Alternatively, right-click the app → Open → Open the first time, which tells Gatekeeper you trust it.)
This step is only needed because the app is distributed outside the App Store without notarization — it does not disable Gatekeeper for anything else.
On first launch KeepAwake requests:
- Accessibility — required by the global keyboard-shortcut engine.
- Notifications — optional, used for status alerts if enabled in Preferences.
Released under the MIT License. © 2026 Ahmad Farid Abbas.



