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 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 157
sleepwatcher --HEAD 1
Installs on Request (30 days)
sleepwatcher 157
sleepwatcher --HEAD 1
Build Errors (30 days)
sleepwatcher 0
Installs (90 days)
sleepwatcher 554
sleepwatcher --HEAD 3
Installs on Request (90 days)
sleepwatcher 554
sleepwatcher --HEAD 3
Installs (365 days)
sleepwatcher 2,060
sleepwatcher --HEAD 6
Installs on Request (365 days)
sleepwatcher 2,060
sleepwatcher --HEAD 6
Fork me on GitHub