commit 54565448751a7ee30dd81475804dc8a571d8b57e
parent b97744f7df6d596cd40e79bf7ea206d34b97933b
Author: pyratebeard <root@pyratebeard.net>
Date: Wed, 25 May 2022 08:47:01 +0100
check last status before comparing with current
when fully charged notification would constantly popup as $LAST_STATUS
was empty
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/check-batt b/check-batt
@@ -37,6 +37,7 @@ if [[ "$CHECK" == "Y" ]] ; then
fi
# Battery status changed
+LAST_STATUS=$(grep ^LAST_STATUS $STATUS_FILE | awk -F= '{print $2}')
if [[ "$BATTSTATUS" != "$LAST_STATUS" ]] ; then
notify "normal" "battery is now $BATTSTATUS, Capacity: $BATTPERC"
save_status