Hi, all. I was recommended to come here by blackcain.
I’ve been thinking about possible ways to improve upon the theming situation, and doing a lot of reading to try and get a feel for where things are going. I’ve read issue tracker discussions in the libadwaita repo and blog posts from various contributors to try and get a sense for things. I have this really huge stream of consciousness document about it, but I’ve tried to pare things down as best as I can.
The blog post that jumps out at me the most is this one by Jordan Petridis. And that’s the primary inspiration behind this small pitch.
In that post, Jordan made a theme. It’s a really, really slick-looking theme. But there is a key difference between that theme and what GTK3 has been doing for most of its lifecycle. That theme is applied on top of Adwaita’s stylesheet rather than entirely replacing it, and hence, having to reimplement it. As a result, the theme is comprised of very little code. And it works in synergy with the existing stylesheet and its conventions. In fact, it probably doesn’t even need to worry very much about how Adwaita changes.
So, how is the proof-of-concept theme even currently loaded? Well, that’s the part that stinks, and is what I would like to fix. Right now, you have to put it in xdg-config/gtk-4.0/gtk.css
in order for it to apply on top of the Adwaita stylesheet. You can’t save it in xdg-data/themes/JordanSickTheme/gtk-4.0/gtk.css
and load it that way for two reasons: currently, LibAdwaita ignores the gtk-theme-name setting and loads the Adwaita styleshet. It does however honor the GTK_THEME environment variable… but in so doing, replaces the stylesheet. So “JordanSickTheme” doesn’t have Adwaita underneath it as it is designed to, and thus everything would look really messed up but with a cool gradient.
In addition, this would all still affect GTK4 apps that are not Adwaita apps, and thus it wouldn’t really look right with them. If Elementary migrates to GTK4, it would mess up Elementary apps that are used alongside Adwaita apps. I think at the very least, some sort of care should be taken to make distinct the way that users customize GTK4-based platforms.
Adwaita seems like it’s trying to be distinct from GTK4 while still using it and affording GTK4 some sort of independence. So I think that in order to make things easier and cleaner for users who are determined to customize their system, but also potentially lay a foundation for a more desirable form of theming for everyone, Adwaita should look for platform stylesheets to load on top of its own, distinct from GTK4.
If this were to be enabled in the most minimal way possible without anything resembling real support, it could look for xdg-data/gtk-4.0/adwaita.css
and load that after loading gtk.css. To go a teensy step further, it could check an ADWAITA_THEME environment variable for a theme: xdg-data/themes/$ADWAITA_THEME/adwaita-1.0/adwaita.css
. And if you wanted to go further still, you could check the gtk-theme-name and load that. But in all of these cases, they load after Adwaita’s base stylesheet, not replacing that. No more wild west.
I think that this is an opportunity to make a concept for Adwaita theming as a concept that supercedes GTK theming, and would make GNOME a more appealing platform even for customizers and theme authors. I also think that it is a good opportunity to establish ground rules for what theme authors should and should not do, which is something we had in GTK2 but disappeared in GTK3.
Thanks for your time.