From 8298f6439444c353ba093c4056f86101ce0cb364 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 27 Mar 2016 15:05:43 +1100 Subject: [PATCH] Fix windows displaying a blank battery output when no battery is found --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 44b81be0..696a49ea 100755 --- a/neofetch +++ b/neofetch @@ -1603,7 +1603,8 @@ getbattery () { battery=${battery/EstimatedChargeRemaining'='} battery=${battery//[[:space:]]/ } battery=${battery// } - battery+="%" + [ ! -z "$battery" ] && \ + battery+="%" ;; esac