Keep your Mac awake. A tiny native menu bar utility.
- One switch to keep your Mac awake, for as long as you want
- Timer from 15 minutes to 8 hours, or any number of minutes you type
- The timer counts inactivity: as long as you keep using the Mac, it starts over. It only runs out once you have walked away (you can turn this off)
- Optional: put the Mac to sleep when the timer runs out
- Lid-closed mode: screen off, Mac still working, for example while a coding agent runs
- Launch at login
- Native SwiftUI panel, universal binary (Apple Silicon + Intel), zero dependencies
The interface is in French.
- Download
Vigil-x.y.zipfrom the latest release, unzip it and moveVigil.appto/Applications. - First launch only: the app is not notarized (no paid Apple Developer subscription behind this project), so macOS will warn you. Right-click
Vigil.app> Open > Open. Alternatively:
xattr -d com.apple.quarantine /Applications/Vigil.appRequires macOS 13 or later.
Tick "Continuer capot fermé, écran éteint" to keep the Mac running with the lid closed and the screen off. The screen turns off as soon as the session starts. In this mode the timer is a plain countdown (activity cannot reset it).
macOS only allows this through pmset disablesleep, which needs root. Run this once (it asks for your password), then review what it did:
printf '%s ALL=(root) NOPASSWD: /usr/bin/pmset -a disablesleep 1, /usr/bin/pmset -a disablesleep 0\n' "$(id -un)" > /tmp/vigil-sudoers && sudo visudo -cf /tmp/vigil-sudoers && sudo install -m 440 -o root -g wheel /tmp/vigil-sudoers /etc/sudoers.d/vigilIt installs /etc/sudoers.d/vigil, which lets your user account run pmset -a disablesleep 1 and pmset -a disablesleep 0 without a password. Any program running as you can use that rule too. Remove it with sudo rm /etc/sudoers.d/vigil.
Vigil restores normal sleep when the session ends, when you quit, and at its next launch if it was killed. On battery it stops below 10%. A closed Mac that keeps working gets warm: leave it on a hard surface, never in a bag. If sleep ever stays disabled, run sudo pmset -a disablesleep 0.
open -a Vigil --args --on # activate (not remembered across launches)
open -a Vigil --args --for 45 # start a 45-minute timer./build.shProduces build/Vigil.app (ad hoc signed universal binary). Requires Xcode or the Command Line Tools. The app icon and the menu bar glyph are generated by tools/icongen.swift.
While active, Vigil holds an IOKit power assertion (PreventUserIdleDisplaySleep) — the same macOS mechanism caffeinate uses. Only the unlimited mode is remembered across launches; timers are not. "Sleep at timer end" triggers pmset sleepnow and only fires when the timer expires naturally, never when you stop it yourself.
MIT © 2026 Peechy