l 3 power-action: reverse status check

This commit is contained in:
lassulus 2016-06-28 17:39:03 +02:00
parent a15bd43f00
commit 885ded6ca9

View File

@ -84,9 +84,9 @@ let
'';
state = pkgs.writeDash "state" ''
if [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ]
then echo "true"
else echo "false"
if [ "$(cat /sys/class/power_supply/BAT0/status)" = "Discharging" ]
then echo "false"
else echo "true"
fi
'';