fix battery detection on Windows
This commit is contained in:
parent
59c0d73625
commit
33fce46525
2
neofetch
2
neofetch
|
@ -2261,7 +2261,7 @@ get_battery() {
|
||||||
"Windows")
|
"Windows")
|
||||||
battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining)"
|
battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining)"
|
||||||
battery="${battery/EstimatedChargeRemaining}"
|
battery="${battery/EstimatedChargeRemaining}"
|
||||||
[[ "$(trim "$battery")" ]] && battery="%"
|
[[ "$(trim "$battery")" ]] && battery="$(trim "$battery")%"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Haiku")
|
"Haiku")
|
||||||
|
|
Reference in New Issue