From 2d5f151b7e00d452e49e2921d04436b6e72c3cf5 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 13 Mar 2016 08:48:50 +1100 Subject: [PATCH] Add progress bar support for multiple batteries on linux --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index bc3c743f..2a8ed4b1 100755 --- a/neofetch +++ b/neofetch @@ -1475,7 +1475,12 @@ getbattery () { # Print each battery on a separate line. 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 return fi