jD91mZM2 / xidlehook

GitLab: https://gitlab.com/jD91mZM2/xidlehook
MIT License
387 stars 33 forks source link

flag for --not-on-ac-power ? #33

Open emacsomancer opened 4 years ago

emacsomancer commented 4 years ago

It would be nice to have an option only execute when on battery.

mindrunner commented 4 years ago
grep 0 /sys/class/power_supply/AC/online > /dev/null && /bin/suspend-then-hibernate
wavexx commented 3 years ago

On debian, the powermgmt-base package provides 'on_ac_power' which essentially does this.