diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-05-25 18:56:13 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-05-25 18:56:13 -0400 |
commit | 5cb31c0be7249f95d5ef85000b05b7f3134840b8 (patch) | |
tree | cfd52434403436977e071b9b80c6fbe60bfe1721 | |
parent | f8143b3037c4330cdbed3d5222f70f116e299626 (diff) |
only turn on light on discarging
-rwxr-xr-x | src/usr/local/bin/bat-led-set | 2 |
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 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 |