- cross-posted to:
- linux@programming.dev
- cross-posted to:
- linux@programming.dev
I have found the gtk theming to be extremely confusing. It’s too complicated IMHO, or I’m missing something. I wanted to make the titlebar/window manager bar darker (with white text maybe) on this theme https://mastodon.social/@eugenialoli/115201547347227741 and I couldn’t figure out how to ONLY change the titlebar. I want the various elements (e.g. window bar, menu bar, icon bar etc) to have slightly different colors you see, so I can differentiate what’s what. I can’t use dark themes because I can’t see where the boundaries are of each window/thing. My eyes just can’t differentiate dark theme elements. It’s a mystery to me how people can use these themes. :o)
It only makes gtk theming slightly less of a pain in the ass, but you can use gtk’s inspector (enabled thru a gsettings terminal command and then ctrl+shift+d in the app or thru an environment variable) to find the classes, names, and object types for whatever you’re trying to theme.
As far as i understand it (never made one, only modified), it’s like creating a global usercss for the web (that i did), except with imports and symlinks. You have some generally used class names that fit most of the apps, except that one tool and then some. Then there’s gtk 2.0, 3.0, 3.1, 3.1/4⁴, 4.0 and the window theme, which is (luckily still) separate.
Honestly Gtk theming has extremely poor documentation and you need to look closely at existing themes to figure out all the CSS selectors you need to define. It is definitely possible, but can require some trial and error.
Not all themes are created equal, but the titlebar is actually one of the easier things to theme.
That being said, it really depends on your DE, and if the apps you are using are Qt or Gtk 3/4.
I really wish they had better guides online, but that was the main reason I spent time working on Celestial. To finally have the consistency i wanted, and untangle the theming mess.
Thanks for sharing your thought process going through this. Theming is important, perhaps more important than we think of regularly, it’s actually one of the main things I enjoy about linux. I believe it’s also a reason why people are leaving Windows as it has become way too corporate and soulless.
Absolutely, the ability to actually customize your computer to the smallest detail is what brings the uniqueness to our setups.