You are not logged in.
We, at TROMjaro (tromjaro.com) are trying to find a way to sync the themes across: GTK, GTK+Libadwaita, Qt5, QT6, Flatpaks... And we did it. This is our package https://git.trom.tf/TROMjaro/fixes-pack … ranch/main .
So basically we are able to sync the theme, icons, and font across all of these which is really useful and provides consistency. And it is all done via the XFCE's Appearance tool.
But in order to do this we have to check what users have selected in terms of themes/icons/fonts and push these changes to the other tools we use for QT and such. However we have to make our script run every few seconds....which is quite a bad approach. The best would be to detect when the theme is changed and then trigger our scripts.
So, my question is: is there a way in XFCE to detect when a theme/icon/font is changed and based on that to trigger our scripts? We can't find a way to do this...
Last edited by Tio (2022-09-18 16:18:57)
Offline
If you are willing to run a script all the time, you can monitor the xsettings channel as react to output as icon,theme, or font change. Something like:
#!/bin/bash
while read -r line; do
if ( echo $line | grep Icon ); then
echo "icon theme changed"
elif ( echo $line | grep Theme ); then
echo "appearance theme changed"
elif ( echo $line | grep Font ); then
echo "font changed"
fi
done < <(xfconf-query -c xsettings -mv)
exit 0
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Amazing thank you very much! We will test this approach for sure! - Much appreciated!
Offline
Works like a charm! Thank you again!
Offline
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 524.06 KiB (Peak: 529.51 KiB) ]