From db9ed9244f70eeca7611ade5f4efcf47d9199fff Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Mon, 4 May 2020 21:43:01 -0400
Subject: highlight caps lock on low battery
---
src/etc/udev/rules.d/99-lowbat.rules | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'src/etc/udev')
diff --git a/src/etc/udev/rules.d/99-lowbat.rules b/src/etc/udev/rules.d/99-lowbat.rules
index 1d322e3..ecb80b5 100644
--- a/src/etc/udev/rules.d/99-lowbat.rules
+++ b/src/etc/udev/rules.d/99-lowbat.rules
@@ -1 +1,5 @@
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-1]", RUN+="/usr/bin/systemctl hybrid-sleep"
+
+SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/local/bin/bat-led-set 1"
+SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[1-9][0-9]|[6-9]", RUN+="/usr/local/bin/bat-led-set 0"
+SUBSYSTEM=="power_supply", ATTR{status}=="Charging", RUN+="/usr/local/bin/bat-led-set 0"
--
cgit