Ubuntu – What files to edit to change title bar and border width of Ubuntu 18.04 LTS

18.04themes

Since the upgrade to Ubuntu 18.04 LTS from 16.04 LTS, none of my custom themes work. In fact, they distort my display so much that it becomes unusable.

Luckily I can change it back to something workable with this cli:

$ gsettings set org.gnome.desktop.interface gtk-theme "Breeze"

The problem with all the available Themes is I usually have over 10 terminal screens loaded while working, and without borders, I can't tell where one terminal ends and the next terminal begins.

Also It' hard to tell which application window is active because there isn't enough difference between the colors.

I'm trying to manually edit the Adwaita theme. It has an empty gtk-3.0 folder and a gtk-2.0 folder which has a main.rc file which I'm sure is the control file. I can't figure out what to change to affect the Title bar and the border width.

I'm trying to do the same thing with Ubuntu 18.04 that is done here with Ubuntu 16.04 in this answer:
How to edit the color of the title bar and border width of a gtk3 theme?

Ubuntu 18.04 themes configuration appears to be totally different.

Best Answer

I was able to add border to windows in Ubuntu 18.04 by doing the following:

nano ~/.config/gtk-3.0/gtk.css

Then add the following:

decoration {
    border: 3px solid gray;
    background: gray;
}

After saving the file, remember refresh gnome using this command:

setsid gnome-shell --replace

I found it works well for Ambiance. I like the border slightly thicker (3px) to make it a little easier to see in laptop running in 1920x1080 resolution.

EDIT:

To customize the active title bar background colors. (use :backdrop for inactive windows)

.titlebar {
    background: #0759EB;
}

.titlebar:backdrop  {
    background: #829EDF;
    color:white;
}