I like best to change the system the least. So, based in this post - Ubuntu 18.04: Change color of window title bar - I did the following changes:
- In ~/.config/gtk-4.0/gtk.css (it should be empty...):
.titlebar, headerbar {
background: #3d3d3d;
border-color: #3d3d3d;
border-width: 0 0 0px;
border-style: solid;
min-height: 38px;
box-shadow: none;
color:white;
}
.titlebar:backdrop, headerbar:backdrop {
background: #4c4a48;
box-shadow: none;
color:white;
}
windowcontrols button {
padding: 2px;
margin: 0 7px;
border: none;
box-shadow: none;
background: transparent;
color: #FFFFFF;}
windowcontrols button.maximize, windowcontrols button.maximize:backdrop, windowcontrols button.minimize, windowcontrols button.minimize:backdrop {
background: transparent; }
windowcontrols button.maximize:hover, windowcontrols button.maximize:backdrop:hover, windowcontrols button.minimize:hover, windowcontrols button.minimize:backdrop:hover {
background: #4f4f4f; }
windowcontrols button.maximize:active, windowcontrols button.maximize:backdrop:active, windowcontrols button.minimize:active, windowcontrols button.minimize:backdrop:active {
background: #5c5c5c; }
windowcontrols button.close {
background: #E95420; }
windowcontrols button.close:hover {
background: #F00400; }
windowcontrols button.close:active {
background: #E95420; }
windowcontrols button.close:backdrop {
background: #636363; }
windowcontrols button.close:backdrop:hover {
background: #707070; }
windowcontrols button.close image {
color: #F7F7F7; }
- In ~/.config/gtk-3.0/gtk.css (it should be empty...):
.titlebar, headerbar {
background: #3d3d3d;
border-color: #3d3d3d;
border-width: 0 0 0px;
border-style: solid;
min-height: 38px;
box-shadow: none;
color:white;
}
.titlebar:backdrop, headerbar:backdrop {
background: #4c4a48;
border-color: #4c4a48;
box-shadow: none;
color:white;
}
button.titlebutton:not(.appmenu) {
min-height: 24px;
min-width: 24px;
padding: 2px;
color: #FFFFFF;}
headerbar button.titlebutton.maximize:not(.appmenu):hover, headerbar button.titlebutton.maximize:not(.appmenu):backdrop:hover, headerbar button.titlebutton.minimize:not(.appmenu):hover, headerbar button.titlebutton.minimize:not(.appmenu):backdrop:hover, .titlebar button.titlebutton.maximize:not(.appmenu):hover, .titlebar button.titlebutton.maximize:not(.appmenu):backdrop:hover, .titlebar button.titlebutton.minimize:not(.appmenu):hover, .titlebar button.titlebutton.minimize:not(.appmenu):backdrop:hover, headerbar.selection-mode button.titlebutton.maximize:not(.appmenu):hover, headerbar.selection-mode button.titlebutton.maximize:not(.appmenu):backdrop:hover, headerbar.selection-mode button.titlebutton.minimize:not(.appmenu):hover, headerbar.selection-mode button.titlebutton.minimize:not(.appmenu):backdrop:hover, button.titlebutton.maximize:not(.appmenu):hover, button.titlebutton.maximize:not(.appmenu):backdrop:hover, button.titlebutton.minimize:not(.appmenu):hover, button.titlebutton.minimize:not(.appmenu):backdrop:hover {
color: #FFFFFF;
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#4f4f4f), to(transparent)); }
headerbar button.titlebutton.maximize:not(.appmenu):active, headerbar button.titlebutton.maximize:not(.appmenu):backdrop:active, headerbar button.titlebutton.minimize:not(.appmenu):active, headerbar button.titlebutton.minimize:not(.appmenu):backdrop:active, .titlebar button.titlebutton.maximize:not(.appmenu):active, .titlebar button.titlebutton.maximize:not(.appmenu):backdrop:active, .titlebar button.titlebutton.minimize:not(.appmenu):active, .titlebar button.titlebutton.minimize:not(.appmenu):backdrop:active, headerbar.selection-mode button.titlebutton.maximize:not(.appmenu):active, headerbar.selection-mode button.titlebutton.maximize:not(.appmenu):backdrop:active, headerbar.selection-mode button.titlebutton.minimize:not(.appmenu):active, headerbar.selection-mode button.titlebutton.minimize:not(.appmenu):backdrop:active, button.titlebutton.maximize:not(.appmenu):active, button.titlebutton.maximize:not(.appmenu):backdrop:active, button.titlebutton.minimize:not(.appmenu):active, button.titlebutton.minimize:not(.appmenu):backdrop:active {
color: #FFFFFF;
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#5c5c5c), to(transparent)); }
headerbar button.titlebutton.close:not(.appmenu), .titlebar button.titlebutton.close:not(.appmenu), headerbar.selection-mode button.titlebutton.close:not(.appmenu), button.titlebutton.close:not(.appmenu) {
color: #FFFFFF;
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#E95420), to(transparent)); }
headerbar button.titlebutton.close:not(.appmenu):hover, .titlebar button.titlebutton.close:not(.appmenu):hover, headerbar.selection-mode button.titlebutton.close:not(.appmenu):hover, button.titlebutton.close:not(.appmenu):hover {
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#f00400), to(transparent));
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#f00400), to(transparent)); }
headerbar button.titlebutton.close:not(.appmenu):active, .titlebar button.titlebutton.close:not(.appmenu):active, headerbar.selection-mode button.titlebutton.close:not(.appmenu):active, button.titlebutton.close:not(.appmenu):active {
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#E95420), to(transparent));
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#E95420), to(transparent)); }
headerbar button.titlebutton.close:not(.appmenu):backdrop, .titlebar button.titlebutton.close:not(.appmenu):backdrop, headerbar.selection-mode button.titlebutton.close:not(.appmenu):backdrop, button.titlebutton.close:not(.appmenu):backdrop {
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#636363), to(transparent)); }
headerbar button.titlebutton.close:not(.appmenu):backdrop:hover, .titlebar button.titlebutton.close:not(.appmenu):backdrop:hover, headerbar.selection-mode button.titlebutton.close:not(.appmenu):backdrop:hover, button.titlebutton.close:not(.appmenu):backdrop:hover {
background-image: -gtk-gradient(radial, center center, 0, center center, 0.3571428571, to(#707070), to(transparent)); }
For me, it only changes the title bar and its buttons for all windows/apps, included snaps; and also suffers of the mixed theme problem and Firefox. Also, I gave the same height to all the title bars.
The change is immediate for gtk3 apps, like FileZilla, but gtk4 needs to restart Wayland, so you have to log out to test the changes.
I am using this configuration using Yaru light theme, and the maximize button hidden using Tweaks.