Skip to content
ahmadfaridabbasPublic

About

A lightweight native macOS menu bar app that keeps your Mac awake, with quick timers, global shortcuts, and launch-at-login.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

KeepAwake icon

KeepAwake

Keep your Mac awake — a lightweight native menu bar app.

License: MIT Platform Swift

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.

Features

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

Screenshots

Menu bar Timer active Preferences
Menu bar popover Timer running Preferences window

Keyboard Shortcuts

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.

How it works

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.

Requirements

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

Installation

  1. Download KeepAwake.zip from the latest release and unzip it.
  2. Move KeepAwake.app to your /Applications folder.

"KeepAwake is damaged / from an unidentified developer"

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

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

Permissions

On first launch KeepAwake requests:

  • Accessibility — required by the global keyboard-shortcut engine.
  • Notifications — optional, used for status alerts if enabled in Preferences.

License

Released under the MIT License. © 2026 Ahmad Farid Abbas.

About

A lightweight native macOS menu bar app that keeps your Mac awake, with quick timers, global shortcuts, and launch-at-login.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages