diff --git a/1.4.md b/1.4.md index 2df717c5..f4fcd3b8 100644 --- a/1.4.md +++ b/1.4.md @@ -26,6 +26,8 @@ the output. **Battery**
- Added support for NetBSD +- Added `--battery_bar` and `$batter_bar` to enable/disable displaying a progress bar in
+the output. ### Ascii diff --git a/README.md b/README.md index 8be3bfa3..0a525b21 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,7 @@ alias fetch2="fetch \ elapsed, total --cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage. --memory_bar on/off Whether or not to print a progress bar for memory usage. + --battery_bar on/off Whether or not to print a progress bar for battery usage. Image: diff --git a/config/config b/config/config index 244e353f..a5ace791 100644 --- a/config/config +++ b/config/config @@ -237,9 +237,10 @@ progress_color_total="8" # Enable/Disable progress bars # --cpu_usage_bar on/off # --memory_bar on/off +# --battery_bar on/off cpu_usage_bar="on" memory_bar="on" - +battery_bar="on" # }}} diff --git a/neofetch b/neofetch index 4b4ddffa..0e0226ff 100755 --- a/neofetch +++ b/neofetch @@ -259,9 +259,10 @@ progress_color_total="8" # Enable/Disable progress bars # --cpu_usage_bar on/off # --memory_bar on/off +# --battery_bar on/off cpu_usage_bar="on" memory_bar="on" - +battery_bar="on" # }}} @@ -1460,6 +1461,9 @@ getbattery () { battery+="%" ;; esac + + [ "$battery_bar" == "on" ] && \ + battery+=" $(bar ${battery/'%'} 100)" } # }}} @@ -2352,6 +2356,7 @@ usage () { cat << EOF elapsed, total --cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage. --memory_bar on/off Whether or not to print a progress bar for memory usage. + --battery_bar on/off Whether or not to print a progress bar for battery usage. Image: @@ -2476,6 +2481,7 @@ while [ "$1" ]; do ;; --cpu_usage_bar) cpu_usage_bar="$2" ;; --memory_bar) memory_bar="$2" ;; + --battery_bar) battery_bar="$2" ;; # Image --image)