this post was submitted on 01 May 2024
16 points (90.0% liked)
Linux
59158 readers
445 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments

Defining sidebar_bg_color does not work?
see libadwaita named colors
GTK Inspector comes with GTK, you don't need to install it.
Enable it with gsettings
gsettings get org.gtk.Settings.Debug enable-inspector-keybinding trueso you can invoke it either by running
GTK_DEBUG=interactive application-name-hereor, when alredy using the application, via Control + Shift + I/Control + Shift + DThat's it. Thank you for this.
You're most certainly welcome.
I wanted to add on this, for anyone else stumbling across this post and struggling with sidebar theming: The above will work 90% of the time, but in case your
some-random-theme.cssoverrides@sidebar_, or doesn't follow the naming convention to begin with, search your gtk.css for.sidebar-pane, which should be the actual css selector for@sidebar_, and.content-panefor@secondary-sidebar_.Gotcha. One last thing. Do I need to define helper colors as well? currently I am not doing that, but it is defined in the adw styleguide. Ain't no way gruvbox has that much color varieties so what's your suggestion?
Nah, unless you're unhappy with the current outcome, you can leave it as it is.
Changes in
.config/gtk-4.0/gtk.csswill be applied on top of the stylesheet, so whatever you don't override there, will fall back to the default, that's why your sidebar previously went full Adwaita light mode.After taking a brief look at the libadwaita source, as far as I can see, helper colors are a special case anyways,
@bordersas well asborder_coloris used exclusively in thescssfiles (which the gtk.css is generated from), whereas the gtk.css for some reason doesn't get back to the generic name, but uses the assigned valuealpha(currentColor,0.15)- which doesn't help your case at all.To actually change @borders, you would need to modify its value in .scss and regenerate the .css then.
For your other point, there's no need to introduce a new color for this, since the helper color is an alpha value derived from your foreground color (that's what currentColor is referring to), so if you change
_fg_colorin gtk.css,@borderswill change along with it.Alright. Thank you so so so much.