Square Corners for GNOME Windows?

As the title suggests, I’m looking to make all four corners of windows square and not rounded; currently, GNOME insists on rounding the top-left and top-right corners. I’ve checked for a GNOME extension, but couldn’t find one. I’m okay with tinkering around with css code if someone can point me in the right direction.

Thanks for the help, all…

css solutions , not tested :wink:

  1. Reddit - Dive into anything >> How can I switch back to square corners?
  2. Reddit - Dive into anything >> Non-rounded corners in Gnome shell 43, Fedora 37

“Rounded Window Corners Reborn” extension and set corners to zero (mentioned in link 2.)

1 Like

Although the GNOME extensions referenced did nothing, adding the following lines to ~/.config/gtk-4.0/gtk.css worked like a charm:

window, decoration, decoration-overlay, headerbar, .titlebar {
 	border-bottom-left-radius: 5px;
	border-bottom-right-radius:5px;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

Thanks, @ilikelinux!

1 Like

And I spoke too soon… After shutting down yesterday and logging in again today, there are no changes to the top curvature of the windows. :frowning:

The search continues for a solution…

The changes should be persistent. I’ve noticed, however, that you are mentioning about top corners only, which is rather specific to certain legacy gtk apps. So you might want to create the css file in ~/.config/gtk-3.0/ as well.

1 Like

One thing i found while tweaking Gnome Shell and GTK, is that there seems to be little good documentation for the CSS classes and attributes that are used. There are some online resources like the one below:

And tools like Gnome Inspector:

But they feel unintuitive and cumbersome to use, it makes any tweaking a chore rather than a pleasure.

If anyone knows some better and more concise documentation that lists the actually used CSS ids/classes and attributes in Shell and GTK, do let me know.

2 Likes

Really good thought, Mike B.; I didn’t even think of legacy apps… Back when I was regularly trying to theme GNOME Shell, rather than just accepting most of the Adwaita decisions, I was always surprised at how many up-to-date, brand-new apps were considered legacy because of their visual code. It seems that adding that gtk.css file to ~/.confiig/gtk-3.0/ has worked. Thanks for that idea…

I also really appreciate those links Olivier… Time to go play.

2 Likes

I did some further digging and i suspect you will only need to target the window object for the border-radius:

window {
 	border-bottom-left-radius: 5px;
	border-bottom-right-radius:5px;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}
1 Like

I found much the same in my research, Olivier; thanks for that suggestion.