If the DE detection fails fallback to the generic theme detection
This commit is contained in:
parent
caf55803f3
commit
cbc33486f7
10
fetch
10
fetch
|
@ -1089,6 +1089,10 @@ getresolution () {
|
|||
# GTK Theme/Icons/Font {{{
|
||||
|
||||
getgtk () {
|
||||
# Fix weird output when the function
|
||||
# is run multiple times.
|
||||
unset gtk2theme gtk3theme
|
||||
|
||||
case "$1" in
|
||||
theme)
|
||||
name="gtk-theme-name"
|
||||
|
@ -1147,8 +1151,9 @@ getgtk () {
|
|||
gtk2theme=$(xfconf-query -c xsettings -p /Net/$xfconf)
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
*)
|
||||
if [ -z "$gtk2theme" ] && [ -z "$gtk3theme" ]; then
|
||||
# Check for gtk2 theme
|
||||
if [ -f "$HOME/.gtkrc-2.0" ]; then
|
||||
gtk2theme=$(grep "^[^#]*$name" "$HOME/.gtkrc-2.0")
|
||||
|
@ -1175,8 +1180,7 @@ getgtk () {
|
|||
gtk3theme=${gtk3theme/${name}*=}
|
||||
gtk3theme=${gtk3theme//\"}
|
||||
gtk3theme=${gtk3theme/[[:space:]]/ }
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Toggle visibility of gtk themes.
|
||||
[ "$gtk2" == "off" ] && unset gtk2theme
|
||||
|
|
Reference in New Issue