Merge pull request #1226 from edward-p/fix-GTK2_RC_FILES
Handle GTK2_RC_FILES with multiple values
This commit is contained in:
commit
b9b11ed4d5
1 changed files with 6 additions and 3 deletions
9
neofetch
9
neofetch
|
@ -2725,8 +2725,11 @@ 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
|
||||
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")"
|
||||
|
||||
elif [[ -f "/etc/gtk-2.0/gtkrc" ]]; then
|
||||
gtk2_theme="$(grep "^[^#]*${name}" /etc/gtk-2.0/gtkrc)"
|
||||
|
@ -2736,7 +2739,7 @@ get_style() {
|
|||
|
||||
fi
|
||||
|
||||
gtk2_theme="${gtk2_theme/${name}*=}"
|
||||
gtk2_theme="${gtk2_theme/*${name}*=}"
|
||||
fi
|
||||
|
||||
# Check for general GTK3 Theme.
|
||||
|
|
Loading…
Reference in a new issue