I really like the polished look of GNOME and its default theme Adwaita, but there is one thing that has been bugging me for some time. By default server side window decorations are light and if an app has a dark UI and uses a server side window decorations, you get a dark window with a light title bar. It doesn’t look every nice and when you maximize the window, it’ll get even worse because you get a nice black-and-white hamburger (black top bar, light title bar, and dark window content).
There are quite a few apps suffering from this: Atom, Firefox Developer Edition, Blender,…
But Mutter actually allows the clients to set a theme for their window decorations even though they’re rendered on the server side. They just need to set an x window property GTK_THEME_VARIANT=dark.
And I think the difference speaks for itself:
You can test it by executing: xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark
and clicking the window where it should apply.
Are you a user of one of the apps that would benefit from it? Or even a contributor? Try to convince the project to implement this tiny change. If you’re a distro maintainer of such an app, you may consider applying a small patch.
13 thoughts on “Dark title bars for apps with dark UI”
I suppose setting this X property won’t work in Wayland? What’s the solution there, then?
It does work on Wayland. I’m running on Wayland and can change the decoration theme via the x window property.
Only for X11 applications using XWayland.
Yes, it only works on XWayland, but right now it’s solely an issue of X applications. All native Wayland apps I’ve seen so far have a client-side decorations. We’ll see how it’s gonna work with KDE apps since they still intend to have server-side decorations even on Wayland.
really nice, an small bash file could be created to start the application and set it using window name 😉
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -name “Blender”
what is the difference between setting the X property and setting Global Dark Theme option in Gnome Tweak Tool?
With x property, it can be done per application. I still want to use the light version of Adwaita by default, I just want dark decorations for apps that have a dark UI.
If the application itself knows it is using a dark theme, setting this property should be done by the application.
there is plugin for atom gtk-dark-theme https://atom.io/packages/gtk-dark-theme
How I start Spotify with dark windows?
I love you!!!!!!! Thanks for this