Vigilo
A lightweight macOS menu bar application that prevents your Mac from sleeping.
Features
- Prevents display sleep
- Prevents system sleep
- Simple toggle interface
- Visual status indicator in menu bar
- Start on startup option
- Minimal resource usage
Installation
go install github.com/ranglust/vigilo@latest
Build from source
go build -o vigilo main.go
Run
./vigilo
The application will appear in your menu bar.
Usage
- Click the menu bar icon to open the menu
- Click "Disable" to turn off sleep prevention
- Click "Enable" to turn it back on
- The icon shows "ON" or "OFF" to indicate current state
- Click "Start on Startup" to automatically launch Vigilo when you log in
The application starts enabled by default.
Requirements
Dependencies
- github.com/ebitengine/purego - Pure Go system calls
- github.com/getlantern/systray - System tray functionality
How it works
Vigilo uses macOS IOKit Power Management APIs to create power assertions that prevent both display and system sleep. When enabled, it maintains two assertions:
PreventUserIdleDisplaySleep - Keeps the display on
PreventUserIdleSystemSleep - Keeps the system awake
License
See LICENSE file for details.