Fix gtk3 theme detection

This commit is contained in:
Dylan 2016-01-28 11:34:41 +11:00
parent 7186bd31e7
commit 45b96fa550
1 changed files with 5 additions and 4 deletions

9
fetch
View File

@ -357,6 +357,7 @@ case "$os" in
;; ;;
"Mac OS X") "Mac OS X")
# distro="Mac OS X $(sw_vers -productVersion -buildVersion)"
distro="Mac OS X $(sw_vers -productVersion)" distro="Mac OS X $(sw_vers -productVersion)"
;; ;;
@ -1011,13 +1012,13 @@ getgtk () {
# Check for gtk3 theme # Check for gtk3 theme
if [ "$gtk3" == "on" ]; then if [ "$gtk3" == "on" ]; then
if type -p gsettings >/dev/null 2>&1; then if [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
gtk3theme=$(grep "^[^#]*$name" "$HOME/.config/gtk-3.0/settings.ini")
elif type -p gsettings >/dev/null 2>&1; then
gtk3theme="$(gsettings get org.gnome.desktop.interface $gsettings)" gtk3theme="$(gsettings get org.gnome.desktop.interface $gsettings)"
gtk3theme=${gtk3theme//\'} gtk3theme=${gtk3theme//\'}
elif [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
gtk3theme=$(grep "^[^#]*$name" "$HOME/.config/gtk-3.0/settings.ini")
else else
gtk3theme=$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini) gtk3theme=$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)
fi fi