A lightweight macOS menu bar utility that prevents your Mac from sleeping. No bloat, no subscriptions, no unnecessary features — just a toggle in your menu bar.
Amphetamine is great but heavyweight. Vigil exists because keeping a Mac awake shouldn't require a complex app with dozens of features you'll never use.
Vigil uses the same kernel API (IOPMAssertionCreateWithName) that powers caffeinate — but instead of a terminal command, you get a menu bar icon. One click to keep your Mac awake, one click to stop.
- Two sleep prevention modes: "Display & System" keeps everything awake; "System Only" lets the screen sleep while preventing idle system sleep
- Launch at Login: optional, off by default
- Remember Last State: optionally restores the previous state on launch
- Menu bar only: no Dock icon, no Cmd+Tab entry — stays out of your way
Vigil creates IOPMAssertions — the same mechanism macOS uses internally to prevent sleep during downloads, presentations, and Time Machine backups. The OS automatically releases all assertions if the app crashes or quits, so there's no risk of leaked state.
| Mode | Idle sleep | Display sleep |
|---|---|---|
| Display & System | Blocked | Blocked |
| System Only | Blocked | Allowed |
Lid close, manual sleep, and critical battery always override — Vigil can't prevent those (by design).
- macOS 15.6 (Sequoia) or later
- Apple Silicon or Intel
git clone https://github.com/vasylenko/vigil.git
cd vigil
xcodebuild build -project app/Vigil.xcodeproj -scheme Vigil -configuration Release -destination 'platform=macOS'The built app will be in ~/Library/Developer/Xcode/DerivedData/Vigil-*/Build/Products/Release/Vigil.app.
pmset -g assertions | grep VigilWhen active, you'll see something like:
pid 1234(Vigil): PreventUserIdleDisplaySleep named: "Vigil is keeping your Mac and display awake"
Swift 6, SwiftUI, zero third-party dependencies. ~500 lines of code across three files.

