A tiny macOS menu bar app that toggles sudo pmset -a disablesleep with one click.
- Click the icon: toggle sleep disabled ⇄ allowed
- Launch the
.appagain: open the settings window (handled via app reopen) - The icon reflects the state (💊 filled pill = staying awake / 💊 hollow pill = sleep allowed)
- Lives only in the menu bar; no Dock icon (it appears in the Dock only while settings are open)
While Adderall is running in the menu bar, launching the .app again opens the settings window:
- Launch at login — register/unregister a login item via
SMAppService - Also prevent display sleep — while active, keeps the display awake with
caffeinate -d(no root, fully reversible) - Passwordless execution status — shown as ✓/✗; if not set up, the "Set up" button installs it via a single admin prompt
- Quit Adderall — quit button (there is no menu, so quit from here)
disablesleep requires root, so only that specific command is made password-free via sudoers.
Use the settings window's "Set up" button, or run it in a terminal:
./scripts/install-sudoers.shThis installs /etc/sudoers.d/adderall-disablesleep with only these lines (no other pmset operations are allowed):
<user> ALL=(root) NOPASSWD: /usr/bin/pmset -a disablesleep 0
<user> ALL=(root) NOPASSWD: /usr/bin/pmset -a disablesleep 1
To remove it: sudo rm /etc/sudoers.d/adderall-disablesleep.
./scripts/build-app.sh
open Adderall.appLaunch with
open, not by running the executable directly — a directly launched binary may not register in the menu bar.
Publishing a GitHub Release triggers .github/workflows/release.yml, which builds Adderall.app
and attaches a DMG (Adderall-<tag>.dmg) containing an /Applications symlink for drag-to-install.
Open the DMG and drag Adderall into Applications.
Example release flow:
gh release create v0.1.0 --generate-notes
# after publishing, Actions builds the DMG and attaches it to the releaseOn push / PR,
build.ymlonly verifies the build and uploadsAdderall.zipas a workflow artifact.
Builds are ad-hoc signed (not notarized), so Gatekeeper warns on first launch. To bypass:
- In Finder, right-click
Adderall.app→ "Open", or xattr -dr com.apple.quarantine /Applications/Adderall.app
Adderall checks GitHub Releases for a newer version on launch, and you can check manually from the settings window ("Check for updates"). When a newer version exists, it offers to download the release DMG, replace the running app in place, and relaunch.
Because the updater strips the quarantine attribute when it swaps the app, the Gatekeeper warning above only appears on the first manual install — subsequent auto-updates open without a warning. (Updates are fetched over HTTPS from GitHub; there is no Developer ID / EdDSA signature check beyond TLS.)
The build's version comes from the git tag (
APP_VERSION/git describe), so the in-app version matches the release tag. The first build that contains this updater must be installed manually; updates are automatic from there on.
- State is read from the
SleepDisabledline ofpmset -g(no root) - Toggling runs
sudo -n /usr/bin/pmset -a disablesleep {0,1}(assumes passwordless setup; shows a prompt if missing) - Passwordless availability is detected with
sudo -k -n …, which ignores any cached sudo timestamp so it reflects only the sudoers rule - Display sleep is controlled by starting/stopping a
caffeinate -dprocess - State is re-read every 5 seconds, so changes made elsewhere (e.g. a terminal) are picked up
swift build # debug build
./scripts/build-app.sh && open Adderall.app