Suspend when the battery is low
This commit is contained in:
parent
28e16734d0
commit
cbf0038c6f
|
@ -37,11 +37,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Suspend to RAM/disk when battery is critical
|
||||
services.upower = {
|
||||
enable = true;
|
||||
percentageLow = 15;
|
||||
percentageCritical = 10;
|
||||
percentageAction = 7;
|
||||
};
|
||||
# Suspend when the battery is critical
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{model_name}=="01AV405", ATTR{capacity}=="[0-5]", RUN+="${config.systemd.package}/bin/systemctl suspend -i"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue