Handle ${GTK2_RC_FILES} with multiple values
This commit is contained in:
parent
cc78503b58
commit
6f1ae617ff
11
neofetch
11
neofetch
|
@ -2683,8 +2683,15 @@ get_style() {
|
|||
|
||||
# Check for general GTK2 Theme.
|
||||
if [[ -z "$gtk2_theme" ]]; then
|
||||
if [[ -f "${GTK2_RC_FILES:-${HOME}/.gtkrc-2.0}" ]]; then
|
||||
gtk2_theme="$(grep "^[^#]*${name}" "${GTK2_RC_FILES:-${HOME}/.gtkrc-2.0}")"
|
||||
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
|
||||
|
||||
elif [[ -f "${HOME}/.gtkrc-2.0" ]]; then
|
||||
gtk2_theme="$(grep "^[^#]*${name}" "${HOME}/.gtkrc-2.0")"
|
||||
|
||||
elif [[ -f "/etc/gtk-2.0/gtkrc" ]]; then
|
||||
gtk2_theme="$(grep "^[^#]*${name}" /etc/gtk-2.0/gtkrc)"
|
||||
|
|
Reference in New Issue