aboutsummaryrefslogtreecommitdiff
path: root/src/usr/local/bin/bat-led-set
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-20 17:00:19 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-20 17:03:04 -0400
commit783a91f38bf07e3aba9c8cc54dbdd9c804628db8 (patch)
treea958f8a033b3e2e630b72aa7a06433e63453a9ae /src/usr/local/bin/bat-led-set
parent21dcca7954c5449e9517c2e0ea5d325e8e7c3980 (diff)
moved the battery percentage check to script
Diffstat (limited to 'src/usr/local/bin/bat-led-set')
-rwxr-xr-xsrc/usr/local/bin/bat-led-set2
1 files changed, 1 insertions, 1 deletions
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