Really fix battery usage on Windows

This commit is contained in:
Dylan 2016-02-04 13:41:16 +11:00
parent d8f9574be9
commit ad25e2677f
1 changed files with 2 additions and 2 deletions

4
fetch
View File

@ -1250,11 +1250,11 @@ getbattery () {
;; ;;
"Windows") "Windows")
battery="$(wmic Path Win32_Battery)" battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining /value)"
battery=${battery/EstimatedChargeRemaining'='} battery=${battery/EstimatedChargeRemaining'='}
battery=${battery//[[:space:]]/ } battery=${battery//[[:space:]]/ }
battery=${battery// } battery=${battery// }
battery+="%" battery+="${battery}%"
;; ;;
esac esac
} }