From 4849e304a678d27c970c5c3217faca9723123bfc Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 31 May 2020 16:41:00 -0700 Subject: [PATCH] battery spacing --- scripts/battery.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/battery.sh b/scripts/battery.sh index 25dc32b..d8c5723 100755 --- a/scripts/battery.sh +++ b/scripts/battery.sh @@ -83,7 +83,12 @@ main() { bat_stat=$(battery_status) bat_perc=$(battery_percent) - echo "♥ $bat_stat$bat_perc" + + if [ -z "$bat_stat" ]; then # Test if status is empty or not + echo "♥ $bat_stat $bat_perc" + else + echo "♥ $bat_perc" + fi } #run main driver program