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?

2 Answers 2

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.

2
  • 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. Aug 11, 2022 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? Aug 11, 2022 at 20:50
1

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;
}
New contributor
maverick is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .