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
tahoe
sequoia
sonoma
ventura
monterey
big sur
macOS on
Intel
sonoma
ventura
monterey
big sur
catalina

Current versions:

stable 2.2.1

Requires: macOS

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
Installs5051,5925,394
Installs (--HEAD)006
Installs on Request5051,5915,375
Installs on Request (--HEAD)006
Build Errors0