From 5cb31c0be7249f95d5ef85000b05b7f3134840b8 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Mon, 25 May 2020 18:56:13 -0400 Subject: only turn on light on discarging --- 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 22a2b6a..e88fec4 100755 --- a/src/usr/local/bin/bat-led-set +++ b/src/usr/local/bin/bat-led-set @@ -1,6 +1,6 @@ #!/bin/sh -if sh -c "cat /sys/class/power_supply/BAT*/capacity | xargs -n1 test 5 -ge"; then +if sh -c "cat /sys/class/power_supply/BAT*/capacity | xargs -n1 test 5 -ge && test $POWER_SUPPLY_STATUS = Discharging"; then export OUT=1 else export OUT=0 -- cgit