caffeinate
caffeinate copied to clipboard
Keeping xidlehook woke
Caffeinate
A command-line app bringing caffeinate functionality to xidlehook.
Features
Triggers
Triggers are used to monitor for when caffeinate should exit (and allow
xidlehook to resume).
- [x] Timer
- [x] PID-based monitoring
Quit Actions
Quit actions are used in conjunction with triggers to perform a final action before caffeinate exits.
Setup
cargo install --git https://github.com/rschmukler/caffeinate
Start xidlehook with a socket argument:
xidlehook --timer primary 60 "xset dpms force off" --socket "/tmp/xidlehook.sock"
Usage Examples
# Running indefinitely (exit with Ctrl-C)
caffeinate
# Running for an hour
caffeinate --timer 3600
# Running until a process exits, then shutdown down the machine
caffeinate --pid 1234 --quit=shutdown