sleepwatcher

Install command:
brew install sleepwatcher

Monitors sleep, wakeup, and idleness of a Mac

https://www.bernhard-baehr.de/

License: GPL-3.0-or-later

Development: Pull requests

Formula JSON API: /api/formula/sleepwatcher.json

Formula code: sleepwatcher.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
sonoma ✅
ventura ✅
monterey ✅
big sur ✅
macOS on
Intel
sonoma ✅
ventura ✅
monterey ✅
big sur ✅

Current versions:

stable ✅ 2.2.1

Requires: macOS

Service:

Start now and at login: brew services start sleepwatcher
Run directly: $HOMEBREW_PREFIX/opt/sleepwatcher/sbin/sleepwatcher -V -s /$HOME/.sleep -w /$HOME/.wakeup
For SleepWatcher to work, you will need to write sleep and
wakeup scripts, located here when using brew services:

    ~/.sleep
    ~/.wakeup

Analytics:

30 days90 days365 days
Installs3881,1455,293
Installs (--HEAD)227
Installs on Request3881,1455,275
Installs on Request (--HEAD)227
Build Errors0