mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Really fix battery usage on Windows
This commit is contained in:
4
fetch
4
fetch
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user