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
|
# Suspend when the battery is critical
|
||||||
services.upower = {
|
services.udev.extraRules = ''
|
||||||
enable = true;
|
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{model_name}=="01AV405", ATTR{capacity}=="[0-5]", RUN+="${config.systemd.package}/bin/systemctl suspend -i"
|
||||||
percentageLow = 15;
|
'';
|
||||||
percentageCritical = 10;
|
|
||||||
percentageAction = 7;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue