rschmukler / caffeinate

Keeping xidlehook woke

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Keeping xidlehook woke

License:MIT License


Languages

Language:Rust 100.0%