From 6477d617a157cc9256c9a137dda25f0243f86a9b Mon Sep 17 00:00:00 2001 From: denes Date: Mon, 20 Aug 2018 23:17:20 +0200 Subject: [PATCH] Fixing small typos after the refactoring --- battery_status_led.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/battery_status_led.sh b/battery_status_led.sh index 2101d56..64445c7 100755 --- a/battery_status_led.sh +++ b/battery_status_led.sh @@ -29,18 +29,20 @@ CAPSLOCK_LED_DEV=/sys/class/leds/input4\:\:capslock/brightness # If not set by the systemd service file LED_DEV=${BATTERY_STATUS_LED_DEV:-$CAPSLOCK_LED_DEV} +BAT_FULL=$(cat $BAT_FULL_DEV) + LED=0 while : do # If charging, sleep 1m, then restart the cycle - STATUS=cat $BAT_STATUS_DEV + STATUS=$(cat $BAT_STATUS_DEV) if [ $STATUS == "Charging" ] ; then echo 0 > $LED_DEV sleep 1m continue fi - BAT_NOW=cat $BAT_NOW_DEV + BAT_NOW=$(cat $BAT_NOW_DEV) BAT_PCT=$(($BAT_NOW * 100 / $BAT_FULL)) # If battery has more than >10% left, sleep 1m then restart the cycle