mirror of
https://github.com/pigmonkey/spark.git
synced 2026-07-26 17:28:53 +00:00
suspend on low battery
This really should hibernate rather than suspend, but hibernation doesn't work on my system for some reason. Partially addresses #18
This commit is contained in:
parent
b8a827504f
commit
f3d0466320
2 changed files with 4 additions and 0 deletions
1
roles/laptop/files/udev.rules
Normal file
1
roles/laptop/files/udev.rules
Normal file
|
|
@ -0,0 +1 @@
|
|||
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl suspend"
|
||||
|
|
@ -4,3 +4,6 @@
|
|||
|
||||
- name: Copy logind configuration file
|
||||
copy: src=logind.conf dest=/etc/systemd/logind.conf
|
||||
|
||||
- name: Push udev rule to suspend on low battery
|
||||
copy: src=udev.rules dest=/etc/udev/rules.d/99-lowbat.rules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue