Add progress bar support for multiple batteries on linux
This commit is contained in:
parent
cc6319bc1c
commit
2d5f151b7e
1 changed files with 6 additions and 1 deletions
7
neofetch
7
neofetch
|
@ -1475,7 +1475,12 @@ getbattery () {
|
||||||
|
|
||||||
# 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}%"
|
case "$battery_display" in
|
||||||
|
"bar") prin "${title}${index}: $(bar ${bat/'%'} 100)" ;;
|
||||||
|
"infobar") prin "${title}${index}: ${bat}% $(bar "${bat/'%'}" 100)" ;;
|
||||||
|
"barinfo") prin "${title}${index}: $(bar "${bat/'%'}" 100) ${bat}%" ;;
|
||||||
|
*) prin "${title}${index}: ${bat}%" ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue