Progress bar support for battery usage
This commit is contained in:
parent
5c374d28a2
commit
e3dc2b9a38
4 changed files with 12 additions and 2 deletions
2
1.4.md
2
1.4.md
|
@ -26,6 +26,8 @@ the output.
|
|||
|
||||
**Battery**<br \>
|
||||
- Added support for NetBSD
|
||||
- Added `--battery_bar` and `$batter_bar` to enable/disable displaying a progress bar in<br \>
|
||||
the output.
|
||||
|
||||
### Ascii
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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"
|
||||
|
||||
# }}}
|
||||
|
||||
|
|
8
neofetch
8
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)
|
||||
|
|
Loading…
Reference in a new issue