getgtk fallback to gsettings detection for gtk3 theme/icons
This commit is contained in:
parent
f33124b583
commit
2daaa57f3a
16
fetch
16
fetch
|
@ -874,8 +874,15 @@ getresolution () {
|
||||||
|
|
||||||
getgtk () {
|
getgtk () {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
theme) name="gtk-theme-name" ;;
|
theme)
|
||||||
icons) name="gtk-icon-theme-name" ;;
|
name="gtk-theme-name"
|
||||||
|
type="gtk"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icons)
|
||||||
|
name="gtk-icon-theme-name"
|
||||||
|
type="icons"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -f "$HOME/.gtkrc-2.0" ]; then
|
if [ -f "$HOME/.gtkrc-2.0" ]; then
|
||||||
|
@ -892,6 +899,9 @@ getgtk () {
|
||||||
gtk3theme=${gtk3theme//\"/}
|
gtk3theme=${gtk3theme//\"/}
|
||||||
gtk3theme="$gtk3theme"
|
gtk3theme="$gtk3theme"
|
||||||
gtktheme="$gtk2theme $gtk3theme [GTK3]"
|
gtktheme="$gtk2theme $gtk3theme [GTK3]"
|
||||||
|
else
|
||||||
|
gtk3theme=$(gsettings get org.gnome.desktop.interface $type-theme 2>/dev/null)
|
||||||
|
gtktheme="$gtk3theme [GTK3] "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$gtk2theme" ] && [ "$gtk2theme" == "$gtk3theme" ]; then
|
if [ "$gtk2theme" ] && [ "$gtk2theme" == "$gtk3theme" ]; then
|
||||||
|
@ -905,6 +915,8 @@ getgtk () {
|
||||||
gtktheme=${gtktheme/ [GTK3]/}
|
gtktheme=${gtktheme/ [GTK3]/}
|
||||||
gtktheme=${gtktheme/ [GTK2\/\3\]/}
|
gtktheme=${gtktheme/ [GTK2\/\3\]/}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
gtktheme=${gtktheme/\'}
|
||||||
}
|
}
|
||||||
|
|
||||||
getgtktheme () {
|
getgtktheme () {
|
||||||
|
|
Reference in New Issue