Closed asokero closed 6 months ago
The style in appearance panel controls org.gnome.desktop.interface color-scheme
.
By default, it's default
, when style is switched to dark, the value is switched to prefer-dark
. Note that it does not switch theme, it switches style (which is an alias to color-scheme
.
Then there is org.gnome.desktop.interface gtk-theme
which controls the theme GTK-apps are using.
And then there is yet another option, org.gnome.shell.extensions.user-theme name
, which controls the GNOME Shell theme. It's Yaru-blue
by default. (user-theme
is GNOME Shell extension which can be used to swithc GNOME Shell theme. Oh boy.)
So, what we are aiming here, is to make the Style switch to actually switch themes.
So, in addition to controlling org.gnome.desktop.interface color-scheme
, Style switch should control also org.gnome.desktop.interface gtk-theme
and org.gnome.shell.extensions.user-theme name
.
PR #678 fixes this, but only with themes, which have dark alternative AND their dark alternative is prefixed with -Dark
.
Our default theme is Arc and it's dark counterpart is Arc-Dark. But I just realized that dark alternative naming is not consistent across themes. For example, Yaru's dark alternative is Yaru-dark.
I will enhance the darkmode support by accepting -dark
prefix as well.
Ok, #678 had a bug: it switched Shell theme to GTK theme. #693 fixes the bug by handling/switching GTK and Shell themes independently.
Done and tested working!
The Bookworm version of Gnome has added a "native Gnome-way" to select between Dark and Light UI modes. Currently this option only changes GTK-theme, Gnome-shell theme being unaffected. On ubuntu (as also Bookworm version of Puavo OS) both themes are changed.