I have a few cron jobs which switch between light and dark themes automatically on my KDE system (for those interested, there's the
lookandfeeltool where I simply switch between global light and dark themes (I had to define my own based on others with the alterations I wanted to make), or you can adjust the colours using
plasma-theme-switcher (works on X and Wayland)). It works well, except I happen to rely on a handful of GTK applications, which don't respect these. The most significant of which are Chromium-based browsers / Electron apps such as Chrome itself, or VSCode.
Interestingly however, Firefox handles this perfectly, and responds to theme changes despite being a GTK application. It's also the only GTK application I run that seems to understand that I don't want to use the Nautilus file explorer, and instead uses Dolphin for all file prompts.
My question is how does Firefox do this, and why don't regular GTK apps handle this more gracefully?
The second part of my question is whether there is some sort of DBUS command I can fire which causes GTK applications to "check for theme changes", in order to allow my programs to respond to my scripts.
Thanks for any pointers