Docs: Update docs to change progress to bar

This commit is contained in:
Dylan Araps 2016-11-13 21:36:24 +11:00
parent 2ab56e8570
commit a7ed58970c
3 changed files with 3194 additions and 27 deletions

3167
;w Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1066,7 +1066,7 @@ get_memory() {
esac
memory="${memused}MB / ${memtotal}MB"
# Progress bars
# Bars
case "$memory_display" in
"bar") memory="$(bar "${memused}" "${memtotal}")" ;;
"infobar") memory="${memory} $(bar "${memused}" "${memtotal}")" ;;
@ -2580,7 +2580,7 @@ set_colors() {
info_color="$(color "${colors[5]}")"
fi
# Progress Bar colors
# Bar colors
if [[ "$bar_color_elapsed" == "distro" ]]; then
bar_color_elapsed="$(color fg)"
else
@ -2696,7 +2696,7 @@ bar() {
prog="$(printf %"$elapsed"s)"
total="$(printf %"$((bar_length - elapsed))"s)"
# Set the colors and swap the spaces for $progress_char
# Set the colors and swap the spaces for $bar_char_
bar+="${bar_color_elapsed}${prog// /$bar_char_elapsed}"
bar+="${bar_color_total}${total// /$bar_char_total}"
@ -2879,20 +2879,20 @@ usage() { printf "%s" "
--block_height num Height of color blocks in lines
--block_range start end Range of colors to print as blocks
Progress Bars:
--progress_char 'elapsed char' 'total char'
Characters to use when drawing progress bars.
Bars:
--bar_char 'elapsed char' 'total char'
Characters to use when drawing bars.
--bar_border on/off Whether or not to surround the bar with '[]'
--bar_length num Length in spaces to make the progress bars.
--progress_colors num num Colors to make the progress bar.
--bar_length num Length in spaces to make the bars.
--bar_colors num num Colors to make the bar.
Set in this order: elapsed, total
--cpu_display mode Progress bar mode.
--cpu_display mode Bar mode.
Takes: bar, infobar, barinfo, off
--memory_display mode Progress bar mode.
--memory_display mode Bar mode.
Takes: bar, infobar, barinfo, off
--battery_display mode Progress bar mode.
--battery_display mode Bar mode.
Takes: bar, infobar, barinfo, off
--disk_display mode Progress bar mode.
--disk_display mode Bar mode.
Takes: bar, infobar, barinfo, off
Image:
@ -3017,14 +3017,14 @@ get_args() {
--block_width) block_width="$2" ;;
--block_height) block_height="$2" ;;
# Progress Bars
--progress_char)
# Bars
--bar_char)
bar_char_elapsed="$2"
bar_char_total="$3"
;;
--bar_border) bar_border="$2" ;;
--bar_length) bar_length="$2" ;;
--progress_colors)
--bar_colors)
bar_color_elapsed="$2"
bar_color_total="$3"
;;

View File

@ -132,39 +132,39 @@ Height of color blocks in lines
.B \--block_range 'start' 'end'
Range of colors to print as blocks
.SH PROGRESS BARS
.SH BARS
.TP
.B \--progress_char 'elapsed char' 'total char'
Characters to use when drawing progress bars.
.B \--bar_char 'elapsed char' 'total char'
Characters to use when drawing bars.
.TP
.B \--progress_border on/off
.B \--bar_border on/off
Whether or not to surround the bar with '[]'
.TP
.B \--progress_length 'num'
Length in spaces to make the progress bars.
.B \--bar_length 'num'
Length in spaces to make the bars.
.TP
.B \--progress_colors 'num' 'num'
Colors to make the progress bar.
.B \--bar_colors 'num' 'num'
Colors to make the bar.
.br
Set in this order: elapsed, total
.TP
.B \--cpu_display 'mode'
Progress bar mode.
Bar mode.
.br
Takes: bar, infobar, barinfo, off
.TP
.B \--memory_display 'mode'
Progress bar mode.
Bar mode.
.br
Takes: bar, infobar, barinfo, off
.TP
.B \--battery_display 'mode'
Progress bar mode.
Bar mode.
.br
Takes: bar, infobar, barinfo, off
.TP
.B \--disk_display 'mode'
Progress bar mode.
Bar mode.
.br
Takes: bar, infobar, barinfo, off