From d1b9b2f7eb7cdc8500fa9e1893b324339a8bfc55 Mon Sep 17 00:00:00 2001 From: Deluxe Date: Tue, 28 Apr 2020 11:11:33 +0200 Subject: [PATCH] Fix color theme numbering --- bashtop | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bashtop b/bashtop index db7c5d9..a7b8b0a 100755 --- a/bashtop +++ b/bashtop @@ -757,8 +757,7 @@ get_themes() { for file in "${theme_dir}"/*.theme; do file="${file##*/}" if [[ ${file} != "*.theme" ]]; then themes+=("${file%.theme}"); fi - if [[ ${themes[-1]} == "${color_theme}" ]]; then theme_int=$i; fi - ((i++)) + if [[ ${themes[-1]} == "${color_theme}" ]]; then theme_int=${#themes[@]}-1; fi done }