mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
Add progress bar support for multi battery systems
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user