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
Installs2261,2425,279
Installs (--HEAD)127
Installs on Request2261,2425,260
Installs on Request (--HEAD)116
Build Errors0