Skip to content
Eitan FeldmanBA, ARGResumeenes
Lab

Awake

Awake is a macOS app that stops a Mac from sleeping, from the menu bar or the terminal. One binary, four modes, published as an open source release.

Replacing sudo pmset -a disablesleep 1 typed by hand with something that runs from one command, shows its state so you never leave it on by accident, and asks for the password once instead of every time.

The menu bar app, the CLI and the privileged daemon are the same binary invoked differently, so there is nothing to keep in sync and nothing to copy on install.

The decisions worth reading

The helper is a LaunchDaemon, not a sudoers rule. That is what makes the single password prompt possible — it survives reboots.

AuthorizationExecuteWithPrivileges is marked unavailable in the macOS 26 SDK, not merely deprecated. Its official replacement requires a Developer ID certificate, which an open source project cannot assume.

pmset -g is the source of truth, not IOKit and not the preferences plist. The IOKit call is private SPI, and the plist lags a write by seconds. Measured cost of reading it: about 0.3 ms of CPU.

The limitation I will state plainly

The notify(3) channels the app uses are global and unauthenticated: any process on the machine can post com.awake.on. What that grants is exactly one thing — toggling disablesleep — because the events carry no payload and the helper runs pmset with fixed arguments. It is the same capability as a password-less sudoers rule scoped to two commands.