Add progress bar support for multi battery systems
This commit is contained in:
parent
6dc4277b4f
commit
a16e446455
1 changed files with 7 additions and 1 deletions
8
neofetch
8
neofetch
|
@ -1411,7 +1411,13 @@ getbattery () {
|
|||
if [ "${#batteries[@]}" -gt 1 ]; then
|
||||
# Print each battery on a separate line.
|
||||
for bat in "${batteries[@]}"; do
|
||||
prin "${title}${index}: ${bat}%"
|
||||
battery="${title}${index}: ${bat}%"
|
||||
|
||||
[ "$battery_bar" == "on" ] && \
|
||||
battery+=" $(bar $bat 100)"
|
||||
|
||||
prin "$battery"
|
||||
unset battery
|
||||
index=$((index + 1))
|
||||
done
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue