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