5

How can I make window edges squared (instead of round) in Ubuntu 18.04? I am using the Ambiance theme.

enter image description here

What I tried (without any success on 18.04):

  1. The solution from How do I remove rounded borders in GNOME Shell?, which was from an older version of Ubuntu (11.04?) that used GNOME shell.

  2. The solution from How to make ambiance title bar corners squared?, which worked for me in Ubuntu 16.04 when Unity was the default.

Interestingly, the question Rounded corners of windows is trying to remove square corners (which it achieved by removing ~/.config/gtk-3.0/gtk.css) so presumably I need to add some code to that file.

Any ideas on what CSS code is needed?

pomsky
  • 68,507
jII
  • 1,102
  • 1
  • 9
  • 19

1 Answers1

5

Adding the following lines to ~/.config/gtk-3.0/gtk.css have made the corners square:

.titlebar,
.titlebar .background {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

As an alternative, you can use border-radius: 0px 0px 0px 0px.

jII
  • 1,102
  • 1
  • 9
  • 19
  • 1
    If gnome works with proper CSS standards, border-radius: 0 is enough. No need to define all corners, no need for a unit. 0 disables it, and it's actually the default. Have not rebooted yet, with this change, but I am pretty sure it will work. – redanimalwar Aug 11 '22 at 20:24
  • Also, does 22.04+ use GTK 3 or 4? I think they actually use a mix or both. I have libs for 2, 3 and 4 installed. Is ~/.config/gtk-4.0/gtk.css is this the for 4.0 as well? – redanimalwar Aug 11 '22 at 20:50