Battery: Fix % sign when no battery detected on Windows

This commit is contained in:
Dylan Araps 2016-12-18 23:23:58 +11:00
parent 63529ddebf
commit 976ae0090f

View file

@ -1616,7 +1616,7 @@ get_battery() {
"Windows") "Windows")
battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining /value)" battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining /value)"
battery="${battery/EstimatedChargeRemaining'='}" battery="${battery/EstimatedChargeRemaining'='}"
[[ "$battery" ]] && battery+="%" [[ "$(trim "$battery")" ]] && battery="%"
;; ;;
"Haiku") "Haiku")