make some changes

This commit is contained in:
edward-p 2019-05-03 02:27:59 +08:00
parent 6f1ae617ff
commit 836197fc2e

View file

@ -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.