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
  • 70,557
jII
  • 1,102

2 Answers2

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
2

For Ubuntu22.04+, add the following lines to ~/.config/gtk-3.0/gtk.css worked for me

decoratio, window, window.backgroud, window.titlebar, *{
    border-radius:0px;
}
maverick
  • 171