Add progress bar support for multi battery systems
This commit is contained in:
parent
6dc4277b4f
commit
a16e446455
8
neofetch
8
neofetch
|
@ -1411,7 +1411,13 @@ getbattery () {
|
||||||
if [ "${#batteries[@]}" -gt 1 ]; then
|
if [ "${#batteries[@]}" -gt 1 ]; then
|
||||||
# Print each battery on a separate line.
|
# Print each battery on a separate line.
|
||||||
for bat in "${batteries[@]}"; do
|
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))
|
index=$((index + 1))
|
||||||
done
|
done
|
||||||
return
|
return
|
||||||
|
|
Reference in New Issue