See here for context https://github.com/rust-windowing/winit/issues/1549.
Through a combination of
kreadconfig5, I am able to determine whether an app should use a dark or light theme on gnome/kde when not sandboxed, and assuming dark themes have dark in the name, and light themes do not. Kinda janky, but works in most situations.
Does anyone know if the above env variable/programs are available in a flatpak, and that they give the correct result?