Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 857 Bytes

Readme.md

File metadata and controls

44 lines (28 loc) · 857 Bytes

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).

  • Timer
  • 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