Open evilpie opened 4 months ago
I imagine we could run
gsettings get org.gnome.desktop.interface gtk-theme
?
And what would we do with the result? :no_mouth: Is there some sort of schema or requirement for theme names to signify whether they are "dark" or "light"?
@evilpie what OS and DE do you have? (with versions) In modern GNOME, libadwaita is used and detecting GTK theme doesn't make sense.
Unfortunately, as @torokati44 mentioned, detecting non-standard themes is only heuristic. We would basically have to add conditions for every possible DE and somehow guess, similarly to what is done in rust-dark-light. IMO it's better to just add a setting to override the theme in case the user uses non-freedesktop-compatible dark mode.
Linux Mint 21.3 Cinnamon
At any rate, much like with #17179, I'd much prefer accessing whatever mechanism is used for retrieving this setting directly (gsettings
, dconf
, what have you), instead of spawning another process for it.
The approach implemented in #17179 for detecting dark mode doesn't work great for me out of the box. I actually thought I had dark mode turned on, but it's actually in default mode. However because my GTK theme is dark, basically everything I use is dark as well.
I imagine we could run
gsettings get org.gnome.desktop.interface gtk-theme
? Alternatively we could maybe just add an overwrite setting? @kjarosh