Add battery icon in system-info-WSL.sh
This commit is contained in:
parent
b2158b5f93
commit
f4aed11002
@ -36,7 +36,9 @@ while true; do
|
||||
"(Get-WmiObject win32_battery).EstimatedChargeRemaining" \
|
||||
| sed 's/\r//')
|
||||
if [ "" != "$raw_battery" ]; then
|
||||
battery=$(printf "%3d%%" "$raw_battery")
|
||||
battery="$(printf "%3d%%" "$raw_battery") $(echo $raw_battery | \
|
||||
awk '$raw_battery ~ /.*/ { printf "%s\n", \
|
||||
substr("", int($raw_battery / 9), 1) }')"
|
||||
fi
|
||||
|
||||
echo "$cpu_temp$cpu_load$battery" > $cache_file
|
||||
|
Loading…
x
Reference in New Issue
Block a user