I am trying to get this done:
- Move the cursor to the top right corner of the screen and click the close button to close a maximized window.
instead of this:
- Move the cursor to the top-right corner of the screen and then move it slightly back towards the bottom-left direction in order to click the close button.
The first one is much faster and feels more comfortable. It seems to work with some (maybe most) programs, but not with all.
Some programs where it is working: Nemo, VirtualBox, Chromium, LibreOffice (Writer, Calc, Draw, Impress), GParted, Atom, Audacity, VLC media player.
Some programs where it is not working: Nautilus, Gedit, Terminal, Firefox, Settings, Image Viewer.
How to get it working for all programs? Thanks.
I tried this extension but don't know how to configure it to close a maximized window: https://extensions.gnome.org/extension/1362/custom-hot-corners/
A screenshot of a maximized window in case it is needed:
Install and open the Custom Hot Corners - Extended GNOME extension:
Select your monitor on the left menu.
Select the top right corner tab.
Select
Windows-Control
>Close window
under thePrimary Mouse Button
menu.Custom Hot Corners - Extended Screenshot
The only drawback for me is that clicking on the corner closes the first window in the foreground even if it's not maximized, instead of completely minimizing it and then closing the next one with a second click.
Working under Ubuntu 20.04.3 LTS.
I was able to accomplish this with some
gtk.css
styles. Note that this won't affect programs that set their own window titlebar styling, like Firefox, for example.Create a file named
gtk.css
in~/.config/gtk-3.0
.Enter this CSS code, which removes the space to the right of the close button and makes the buttons fill the height of the window titlebar.
Save the file, then log out and back in to apply the changes.