Преглед изворни кода

Fixes #1952

This pull request replaces the old broken code (see #1952) with a simpler, working one for `bar_color_total`, just like `bar_color_elapsed`. Let me know if the old code was done that way for a specific purpose.
Hossam Elbadissi пре 3 година
родитељ
комит
333e04ef45
1 измењених фајлова са 5 додато и 5 уклоњено
  1. 5 5
      neofetch

+ 5 - 5
neofetch

@@ -4715,11 +4715,11 @@ set_text_colors() {
         bar_color_elapsed="$(color "$bar_color_elapsed")"
     fi
 
-    case ${bar_color_total}${1} in
-        distro[736]) bar_color_total=$(color "$1") ;;
-        distro[0-9]) bar_color_total=$(color "$2") ;;
-        *)           bar_color_total=$(color "$bar_color_total") ;;
-    esac
+    if [[ "$bar_color_total" == "distro" ]]; then
+        bar_color_total="$(color fg)"
+    else
+        bar_color_total="$(color "$bar_color_total")"
+    fi
 }
 
 color() {