Added experimental KDE theme detection to getgtk
This commit is contained in:
parent
b603d3395c
commit
1b1bfa2dab
16
fetch
16
fetch
|
@ -1155,6 +1155,7 @@ getgtk () {
|
||||||
gsettings="gtk-theme"
|
gsettings="gtk-theme"
|
||||||
gconf="gtk_theme"
|
gconf="gtk_theme"
|
||||||
xfconf="ThemeName"
|
xfconf="ThemeName"
|
||||||
|
kde="widgetStyle"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
icons)
|
icons)
|
||||||
|
@ -1162,6 +1163,7 @@ getgtk () {
|
||||||
gsettings="icon-theme"
|
gsettings="icon-theme"
|
||||||
gconf="icon_theme"
|
gconf="icon_theme"
|
||||||
xfconf="IconThemeName"
|
xfconf="IconThemeName"
|
||||||
|
kde="Theme"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
font)
|
font)
|
||||||
|
@ -1169,6 +1171,7 @@ getgtk () {
|
||||||
gsettings="font-name"
|
gsettings="font-name"
|
||||||
gconf="font_theme"
|
gconf="font_theme"
|
||||||
xfconf="FontName"
|
xfconf="FontName"
|
||||||
|
kde="font"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -1178,6 +1181,19 @@ getgtk () {
|
||||||
desktop=${desktop^}
|
desktop=${desktop^}
|
||||||
|
|
||||||
case "$desktop" in
|
case "$desktop" in
|
||||||
|
"KDE"*)
|
||||||
|
if type -p kde5-config >/dev/null 2>&1; then
|
||||||
|
kde_config_dir=$(kde5-config --localprefix)
|
||||||
|
|
||||||
|
if [ -f "${kde_config_dir}/share/config/kdeglobals" ]; then
|
||||||
|
kde_config_file="${kde_config_dir}/share/config/kdeglobals"
|
||||||
|
|
||||||
|
gtk3theme=$(grep "^[^#]*$kde" "$kde_config_file")
|
||||||
|
gtk3theme=${gtk3theme/${kde}*=}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
"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)
|
||||||
|
|
Reference in New Issue