Commit 8b0d6a20 authored by Dylan Araps's avatar Dylan Araps

GTK Theme: Group subsitutions

parent 52a8cd49
...@@ -1614,7 +1614,6 @@ getstyle () { ...@@ -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 () { ...@@ -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 () { ...@@ -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 () { ...@@ -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 () { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment