GTK Theme: Group subsitutions

This commit is contained in:
Dylan Araps 2016-06-12 11:41:25 +10:00
parent 52a8cd4916
commit 8b0d6a2095
1 changed files with 6 additions and 6 deletions

View File

@ -1614,7 +1614,6 @@ getstyle () {
*"Cinnamon") *"Cinnamon")
if type -p gsettings >/dev/null 2>&1; then if type -p gsettings >/dev/null 2>&1; then
gtk3theme=$(gsettings get org.cinnamon.desktop.interface $gsettings) gtk3theme=$(gsettings get org.cinnamon.desktop.interface $gsettings)
gtk3theme=${gtk3theme//"'"}
gtk2theme=${gtk3theme} gtk2theme=${gtk3theme}
fi fi
;; ;;
@ -1622,7 +1621,6 @@ getstyle () {
"Gnome"* | "Unity"* | "Budgie") "Gnome"* | "Unity"* | "Budgie")
if type -p gsettings >/dev/null 2>&1; then if 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//"'"}
gtk2theme=${gtk3theme} gtk2theme=${gtk3theme}
elif type -p gconftool-2 >/dev/null 2>&1; then elif type -p gconftool-2 >/dev/null 2>&1; then
@ -1654,7 +1652,6 @@ getstyle () {
fi fi
gtk2theme=${gtk2theme/${name}*=} gtk2theme=${gtk2theme/${name}*=}
gtk2theme=${gtk2theme//\"}
fi fi
# Check for gtk3 theme # Check for gtk3 theme
@ -1674,9 +1671,14 @@ getstyle () {
fi fi
gtk3theme=${gtk3theme/${name}*=} gtk3theme=${gtk3theme/${name}*=}
gtk3theme=${gtk3theme//\"}
fi fi
# Remove quotes
gtk2theme=${gtk2theme//\"}
gtk2theme=${gtk2theme//\'}
gtk3theme=${gtk3theme//\"}
gtk3theme=${gtk3theme//\'}
# Uppercase the first letter of each gtk theme # Uppercase the first letter of each gtk theme
if [ "$version" -ge 4 ]; then if [ "$version" -ge 4 ]; then
gtk2theme=${gtk2theme^} gtk2theme=${gtk2theme^}
@ -1702,8 +1704,6 @@ getstyle () {
# Final string # Final string
theme="${gtk2theme}${gtk3theme}" theme="${gtk2theme}${gtk3theme}"
theme=${theme//\"}
theme=${theme//\'}
# Make the output shorter by removing "[GTKX]" from the string # Make the output shorter by removing "[GTKX]" from the string
if [ "$gtk_shorthand" == "on" ]; then if [ "$gtk_shorthand" == "on" ]; then