From d68ade6f621d2b3e4b9bf75a2af712b409f19c71 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 28 Mar 2023 02:48:10 +0200 Subject: [PATCH] Add udev rule to run suspend when battery drops to 2% --- root/etc/udev/rules.d/50-powersave-suspend.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 root/etc/udev/rules.d/50-powersave-suspend.rules diff --git a/root/etc/udev/rules.d/50-powersave-suspend.rules b/root/etc/udev/rules.d/50-powersave-suspend.rules new file mode 100644 index 0000000..540c738 --- /dev/null +++ b/root/etc/udev/rules.d/50-powersave-suspend.rules @@ -0,0 +1,2 @@ +# Suspend when battery is at or below 2% +SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-2]", RUN+="/usr/bin/systemctl suspend"