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

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

Formula code: sleepwatcher.rb on GitHub

Bottle (binary package) installation support provided for:

Apple Silicon sequoia
sonoma
ventura
monterey
big sur
Intel sonoma
ventura
monterey
big sur
catalina
mojave

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:

Installs (30 days)
sleepwatcher 180
sleepwatcher --HEAD 1
Installs on Request (30 days)
sleepwatcher 180
sleepwatcher --HEAD 1
Build Errors (30 days)
sleepwatcher 0
Installs (90 days)
sleepwatcher 561
sleepwatcher --HEAD 2
Installs on Request (90 days)
sleepwatcher 561
sleepwatcher --HEAD 2
Installs (365 days)
sleepwatcher 2,177
sleepwatcher --HEAD 5
Installs on Request (365 days)
sleepwatcher 2,177
sleepwatcher --HEAD 5
Fork me on GitHub