From 83cb547db97a750c61e5be033be12322487c715f Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 31 May 2020 16:47:48 -0700 Subject: [PATCH] considers if there is AC but no battery percent --- scripts/battery.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/battery.sh b/scripts/battery.sh index cb16297..4d57ad0 100755 --- a/scripts/battery.sh +++ b/scripts/battery.sh @@ -86,6 +86,8 @@ main() if [ -z "$bat_stat" ]; then # Test if status is empty or not echo "♥ $bat_perc" + elif [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power + echo "♥ $bat_stat" else echo "♥ $bat_stat $bat_perc" fi