Commit 716e50ec authored by Dylan Araps's avatar Dylan Araps

Bar: Fix incorrect coloring. Closes #661

parent 51fa1b3c
...@@ -3335,7 +3335,7 @@ set_text_colors() { ...@@ -3335,7 +3335,7 @@ set_text_colors() {
color() { color() {
case "$1" in case "$1" in
[0-6]) printf "%b" "${reset}\033[3${1}m" ;; [0-6]) printf "%b" "${reset}\033[3${1}m" ;;
7 | "fg") printf "%b" "$reset" ;; 7 | "fg") printf "%b" "\033[37m${reset}" ;;
*) printf "%b" "\033[38;5;${1}m" ;; *) printf "%b" "\033[38;5;${1}m" ;;
esac esac
} }
...@@ -3443,12 +3443,12 @@ bar() { ...@@ -3443,12 +3443,12 @@ bar() {
printf -v total "%$((bar_length - elapsed))s" printf -v total "%$((bar_length - elapsed))s"
# Set the colors and swap the spaces for $bar_char_. # Set the colors and swap the spaces for $bar_char_.
bar+="${bar_color_elapsed}${prog// /$bar_char_elapsed}" bar+="${bar_color_elapsed}${prog// /${bar_char_elapsed}}"
bar+="${bar_color_total}${total// /$bar_char_total}" bar+="${bar_color_total}${total// /${bar_char_total}}"
# Borders. # Borders.
[[ "$bar_border" == "on" ]] && \ [[ "$bar_border" == "on" ]] && \
bar="${reset}[${bar}${reset}]" bar="$(color fg)[${bar}$(color fg)]"
printf "%b" "${bar}${info_color}" printf "%b" "${bar}${info_color}"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment