From 783a91f38bf07e3aba9c8cc54dbdd9c804628db8 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Wed, 20 May 2020 17:00:19 -0400
Subject: moved the battery percentage check to script
---
src/usr/local/bin/bat-led-set | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/usr/local/bin/bat-led-set')
diff --git a/src/usr/local/bin/bat-led-set b/src/usr/local/bin/bat-led-set
index 8a7397e..1c59a05 100755
--- a/src/usr/local/bin/bat-led-set
+++ b/src/usr/local/bin/bat-led-set
@@ -1,3 +1,3 @@
#!/bin/sh
-echo $1 >/sys/class/leds/input3::capslock/brightness
+cat /sys/class/power_supply/BAT*/capacity | xargs -n1 test 5 -ge && echo $1 >/sys/class/leds/input3::capslock/brightness
--
cgit