For now, any maximized Qt and GTK3 (no CSD) app can be fast closed by moving the mouse pointer to the right top corner then left click, without searching and precisely positioning the mouse pointer on that small close button, this makes closing any maximized window super easy.
But GTK4 and GTK3 with CSD apps don’t follow this rule, which forces the user to precisely click on the close icon.
Is there any effect/hack that can add an action to the top right corner and makes it easy to close the current maximized window ?
Windows close on alt+F4 I guess. If you emulate that with xdotool, it doesn’t matter if it’s csd or not. I use a top panel to which I added a widget called Spacer As Pager which allows me to do just that, top right corner and left click.
There’s also a custom screen edge script called KwinEdgeCommands but I didn’t take the time yet to look at the little error in it.
And believe it or not, the Napoleonistic app hotcorners-xd even works on current kde. Even comes with a working Skippy-xd ! Go figure. Wouldn’t really recommend that though.
In either case, emulating the key shortcut with xdotool does csd windows as well.
Ok, here’s a not great solution - use the “screen edges” configuration to set a top right corner action of “Present Windows - current application”. When you stick the mouse in the corner, you get an overview with (hopefully just) the offending window and then a middle click anywhere on that large target will close it.
I took another look at the custom screen edge script and I didn’t manage to get it to work. Maybe I might, but I had to install a bunch of dependencies I’m not eager to. But as far as a lazy close, kde “specific” option, that spacer widget works just fine. It can be set to a very small px size, enables overview on middle or right click and mouse scroll. In my case I don’t need top right screen edge to overview anymore which leaves me kind of a “nonchalant” corner for the mouse move. Moreover, it does the job when you don’t use titlebars as well. That being said, a custom screen edge command option would be nice to have. How hard can it be.
This thing’s been around for ages, WITH custom actions:
As a sidenote, for the…“youngsters” who don’t know what skippy-xd is. It’s an exposé/overview type kinda thing that was made twenty years ago. Still works on pretty much any desktop ( or non) environment. I’m just sayin’.
They banned me a long time from their gitlab because I simply criticized their desktop slowness in a ticket.
KDE devs are way more open and really kind, I reported many bugs with many critics and the devs were totally lovely.
Hooking into this, this not only effects the close button, but in your mentioned example of Firefoxt this leads to tabs not being selectable from the top edge of the screen, insteasd, the window will de-maximize on click on the top edge of the screen.
This was not always the case however. I remember not needing to precisely hit a tab in the bar before.
A, ok. Didn’t know that. I’m afraid you don’t many options then. Not unless kde implements a custom screen edge or someone comes up with a working script.
Maybe some css of the padding of the close buttons on gtk csd could work.
I’m sure I came across a custom script once, but for the love of…I can’t find that anymore. In either case, as I mentioned before, I’m afraid your only option is css in the gtk config file. Something like 0 margin and padding for the close button.
I just noticed today that my Brave Browser allows this action. My browser is not maximized, yet I can close it by pushing the mouse to the extreme top-right can left-click. I don’t know how they do it, but I have the resize cursor all along the top of the window, until I get to the minimize button and then I get the arrow all the way to the bottom right corner. This allows me to min, max, close and use the scroll bar on the right side. I have the browser options set to use QT.
I wish I could get a screenshot of the cursor, but I guess I will have to take photos of it with my phone.
As you can see below, the cursor is sitting in the rounded corner.
I have not opened every app I have to test, but I have not noticed this working with any other application. Only Brave. I have to admit, being able to just slam the pointer into the right side and have the scroll bar is pretty awesome.
Before anyone asks, yes, it works the same way maximized. With F11, you lose the buttons, but you still have the scroll bar.