diff --git a/neofetch b/neofetch index 27ce9b0b..fb94116f 100755 --- a/neofetch +++ b/neofetch @@ -2684,12 +2684,8 @@ get_style() { # Check for general GTK2 Theme. if [[ -z "$gtk2_theme" ]]; then if [[ -n "${GTK2_RC_FILES}" ]]; then - for gtkrc in ${GTK2_RC_FILES//:/ }; do - _gtk2_theme="$(grep "^[^#]*${name}" "${gtkrc}")" - [[ -n "${_gtk2_theme}" ]] && gtk2_theme="${_gtk2_theme}" - done - unset _gtk2_theme - + IFS=: read -ra rc_files <<< "$GTK2_RC_FILES" + gtk2_theme="$(grep "^[^#]*${name}" "${rc_files[@]}")" elif [[ -f "${HOME}/.gtkrc-2.0" ]]; then gtk2_theme="$(grep "^[^#]*${name}" "${HOME}/.gtkrc-2.0")" @@ -2701,7 +2697,7 @@ get_style() { fi - gtk2_theme="${gtk2_theme/${name}*=}" + gtk2_theme="${gtk2_theme/*${name}*=}" fi # Check for general GTK3 Theme.