Compare commits

..

No commits in common. "9860bd343bb944d908f6388f25e5e1a68f5336d5" and "d44db40e3e6ac5338f6c3784e7734dd81e2f6dfa" have entirely different histories.

View File

@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
while read -r line; do while read -r line; do
case "$line" in # Check if the system theme has been changed
# When the system theme has been changed if [ "$line" = 'set: /Net/ThemeName' ]; then
'set: /Net/ThemeName')
# Get the current system theme # Get the current system theme
theme=$(xfconf-query -c xsettings -p /Net/ThemeName) theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Find the best match for the xfwm4 theme that corresponds with the current system theme # Find the best match for the xfwm4 theme that corresponds with the current system theme
@ -14,22 +13,22 @@ while read -r line; do
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "${xfwm4_theme#/}" xfconf-query -c xfwm4 -p /general/theme -n -t string -s "${xfwm4_theme#/}"
# Apply the current theme with gsettings # Apply the current theme with gsettings
gsettings set org.gnome.desktop.interface gtk-theme "$theme" gsettings set org.gnome.desktop.interface gtk-theme "$theme"
;;
# When the icon theme has been changed # Check if the icon theme has been changed
'set: /Net/IconThemeName') elif [ "$line" = 'set: /Net/IconThemeName' ]; then
# Get the current icon theme # Get the current icon theme
icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName) icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName)
# Apply the same theme in qt5ct and qt6ct configuration # Apply the same theme in qt5ct and qt6ct configuration
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt5ct/qt5ct.conf sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt5ct/qt5ct.conf
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf
;;
# When the system font has been changed # Check if the system font has been changed
'set: /Gtk/FontName') elif [ "$line" = 'set: /Gtk/FontName' ]; then
# Get the current system font # Get the current system font
font=$(xfconf-query -c xsettings -p /Gtk/FontName) font=$(xfconf-query -c xsettings -p /Gtk/FontName)
# Apply the same font for the title of xfce windows # Apply the same font for the title of xfce windows
xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "$font" xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "$font"
;;
esac fi
done < <(xfconf-query -c xsettings -m) done < <(xfconf-query -c xsettings -m)