Battery: Fix % sign when no battery detected on Windows
This commit is contained in:
parent
63529ddebf
commit
976ae0090f
2
neofetch
2
neofetch
|
@ -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")
|
||||||
|
|
Reference in New Issue