qewer33 / Exquisite

Easy window layout management for KDE Plasma
GNU General Public License v3.0
199 stars 6 forks source link

[0.5 Release] Requested and Indev Features #34

Closed qewer33 closed 1 month ago

qewer33 commented 9 months ago

Related issues: https://github.com/qewer33/Exquisite/issues/11 https://github.com/qewer33/Exquisite/issues/17 https://github.com/qewer33/Exquisite/issues/29 https://github.com/qewer33/Exquisite/issues/33

qewer33 commented 9 months ago

@imthenachoman feel free to comment here!

qewer33 commented 9 months ago

Preview of entries 2 and 3:

vokoscreenNG-2024-01-23_17-48-46.webm

imthenachoman commented 9 months ago

I freaking love this. Thank you!

qewer33 commented 9 months ago

Window tile shortcuts preview

vokoscreenNG-2024-01-25_16-22-42.webm

imthenachoman commented 9 months ago

This looks great!

Do the shortcuts only work when Exquisite is active? Meaning if the shortcuts are also used in other apps, it won't be an issue, right?

And can the shortcuts be anything like a letter, number, a combination?

qewer33 commented 9 months ago

The shortcuts only work when Exquisite is active, so you have to activate Exquisite first and then use the shortcuts. This is a limitation of KWin, the API doesn't allow for custom global shortcuts sadly. But it shouldn't be too big of an issue if you bind Exquisite to something easy to reach (say Shift+A), that way you can quickly toggle Exquisite, select windows, press a few tile shortcuts and ESC out. Certainly a bit more cumbersome than just pressing the shortcuts directly though, yeah.

Shortcuts (for now) can have one modifier (Ctrl, Shift, Alt, Meta) or none and can have one key (any keyboard key defined by Qt). I can implement modifier and key combinations if you want.

imthenachoman commented 9 months ago

The shortcuts only work when Exquisite is active

Awesome!

Shortcuts (for now) can have one modifier (Ctrl, Shift, Alt, Meta) or none and can have one key (any keyboard key defined by Qt). I can implement modifier and key combinations if you want.

Awesome. That works. I like the idea of a single letter so it's easy and fast. Open Exquisite, press a keyboard letter, and done.

qewer33 commented 9 months ago

@imthenachoman I will do a final release next week but if you want to test the requested features early you can install https://github.com/qewer33/Exquisite/raw/main/exquisite.kwinscript and run kpackagetool5 -u exquisite.kwinscript.

zelch commented 9 months ago

@qewer33 I would be happy to do any testing you wanted on multi-monitor support.

Though, I do have to say, working on kwin scripts is rapidly convincing me to spin up a VM.

zelch commented 9 months ago

I may have a PR that addresses this in a few days.

It's mostly written, and it has been tested a bit, but it needs more testing and another look through while I commit the pieces, and I have a few distractions at the moment.

(It's actually about an entirely unrelated feature, but one that really breaks with multiple monitors. I think I ended up fixing a few different things once I got a VM setup for at least the single monitor use cases.)

zelch commented 9 months ago

35 addresses the multiple monitors case, along with several other items which I needed to make my setup more 'me' friendly.

Right now, my biggest remaining gripe is that under Wayland, we are spamming the logs quite badly with 'This plugin does not support raise()', because that gets printed every single time we call raise.

I would happily make a wrapper function that only called raise if we were in a X11 session... Except I can't find a way to detect Wayland vs X11 in a kwin script.

qewer33 commented 9 months ago

Woah, @zelch thanks a lot for the PR! I'll try to review it in my spare time

qewer33 commented 9 months ago

I would happily make a wrapper function that only called raise if we were in a X11 session... Except I can't find a way to detect Wayland vs X11 in a kwin script.

This can probably be implemented with a data source and a shell script. Take a look how the "Restart KWin" button is implemented.

imthenachoman commented 6 months ago

@qewer33 Curious when you plan on doing final release for this to prod?

qewer33 commented 6 months ago

@imthenachoman currently trying to port Exquisite to Plasma 6, it's proving to be somewhat difficult. But thank you for the reminder I'll update the Plasma 5 package in the store

imthenachoman commented 5 months ago

Any luck on pushing the new version to the store?

qewer33 commented 5 months ago

Any luck on pushing the new version to the store?

Pushed!

imthenachoman commented 5 months ago

I am getting flickering when I activate it. Any idea what might be causing it?

qewer33 commented 5 months ago

I am getting flickering when I activate it. Any idea what might be causing it?

Flickering? Does it not open? Or is it a visual glitch? A video and/or kwin log (when run via terminal with kwin_x11 --replace) would be very helpful.

zelch commented 5 months ago

And is the flickering on Wayland or X11?

imthenachoman commented 5 months ago

I'm on Wayland. When I open Exquisite, the entire screen flickers. Let me see if I can get a video.

imthenachoman commented 5 months ago

Couldn't get screen recorder working. Took a video from phone.

https://drive.google.com/file/d/1p-HryWsZHshvPJzu9TQ40iQ3NFC7en1b/view?usp=sharing

qewer33 commented 5 months ago

Super weird. I can't seem to reproduce it on Fedora 38 Wayland. @zelch can you also try?

imthenachoman commented 5 months ago

It could be something up with my computer. I will do some more research/debugging.

zelch commented 5 months ago

Alright...

What video card are you using, and what driver version?

I'm going to take a wild guess that you're on an nVidia card, and that the driver version is going to be significant.

imthenachoman commented 5 months ago

I am running an Intel Core i5-8500 with an integrated Intel UHD Graphics 630.

Don't spend too much time on debugging this. I bet it's something specific to my computer .I've been looking for an excuse to upgrade my PC. I want a new gaming PC. :)

image

imthenachoman commented 5 months ago

So the flickering doesn't happen in X11 and all the Debian experts are telling me I should stick with X11 for Debian stable with KDE. So I suppose I will do that.

imthenachoman commented 5 months ago

@qewer33 Love the changes. I think I see two bugs:

Minor issue but wanted to report.

Great work with this. Very happy!

zelch commented 5 months ago

@qewer33 The change to the text of kcfg_nameAbove in 645af73d66b5f640340da57eff0a501b5b8a9d5c needs to be reverted.

zelch commented 5 months ago

I see the bug related to tiling using the keyboard shortcut, working on that now.

There is an almost identical bug for 'Hide after tiling a layout', but that one looks a lot harder to get right for the keyboard shortcut case.

I'll test the fix for the 'Hide after tiling a window', throw in the fix for kcfg_nameAbove, and try and get a PR out sometime today.

qewer33 commented 5 months ago

@qewer33 The change to the text of kcfg_nameAbove in 645af73d66b5f640340da57eff0a501b5b8a9d5c needs to be reverted.

Yeah I noticed that after pushing the release. I'll look at your PR tomorrow but do we really need a configuration option for showing the labels in the top/bottom? IMHO just having them be on the bottom (or top, doesn't really matter but bottom looks cleaner imo) and having an option for hiding them makes way more sense.

qewer33 commented 5 months ago

Also @zelch have you tried anything or had any luck regarding a Plasma 6 port? I was getting really weird and nonsensical errors the last time I tried. Kinda busy rn so I'll probably take a detailed next month but in the meantime if you want, you can do some tinkering!

qewer33 commented 5 months ago

Great work with this. Very happy!

Thanks and I'm really glad you're enjoying it @imthenachoman ! And sorry for the late release. I thought you were already using the unreleased package and my intention was to release the Plasma 5 version together with a Plasma 6 port but that's going to take a bit longer anyway 😅

imthenachoman commented 5 months ago

@qewer33 No issues at all. This is my main production daily driver so I try to only run things the official/right way. I don't have time to muck with things breaking.

zelch commented 5 months ago

@qewer33 The change to the text of kcfg_nameAbove in 645af73 needs to be reverted.

Yeah I noticed that after pushing the release. I'll look at your PR tomorrow but do we really need a configuration option for showing the labels in the top/bottom? IMHO just having them be on the bottom (or top, doesn't really matter but bottom looks cleaner imo) and having an option for hiding them makes way more sense.

I prefer names on top, you prefer names on bottom, and the code for the configuration option already exists. :)

That said, I do think that an option to hide them entirely would make sense, and in that case, what we want is an option to select top/bottom/none, I can take a look at implementing that sometime here if you're interested.

Also @zelch have you tried anything or had any luck regarding a Plasma 6 port? I was getting really weird and nonsensical errors the last time I tried. Kinda busy rn so I'll probably take a detailed next month but in the meantime if you want, you can do some tinkering!

I have not, I'm on Debian unstable, and Plasma 6 likely won't get packaged until the 6.1 release, or at least the beta for it.

The beta release is scheduled for the 23rd of this month, and the 6.1.0 release is scheduled for 2024-06-18, so exactly a month from now.

I expect that I'll be porting everything that I'm currently using over as soon as that happens. :)

zelch commented 5 months ago

@qewer33 Alright, I've done a quick implementation of making it a drop down, but I wonder if you have any preferences on the appearance in the configuration menu.

image

qewer33 commented 5 months ago

@qewer33 Alright, I've done a quick implementation of making it a drop down, but I wonder if you have any preferences on the appearance in the configuration menu.

I have a better idea, I'll implement it.

Edit: Implemented

image

zelch commented 5 months ago

As an aside, I think we can now check off multi-monitor support, as the screen property of a layout now specifies which display to use. :)

imthenachoman commented 5 months ago

I have a second Debian box now. I use it for testing stuff. I'm happy to user/pressure test your commits if you can tell me how to install them.

imthenachoman commented 5 months ago

I know y'all are working on bug fixes but anyway you could tell me what lines to fix to make it auto hide after using a keyboard shortcut?

zelch commented 5 months ago

@imthenachoman In the settings screen, select the Behavior tab, and check 'Hide after tiling a window'.

imthenachoman commented 5 months ago

@zelch I have that enabled. The bug is that when you tile a window using the keyboard shortcut, it does not hide. It only hides when you click. I was hoping for a quick fix for that? Something I could just update in the code in my installation?

zelch commented 5 months ago

@imthenachoman ... I already fixed that bug, and the fix is in the most recent release.

Can you test again with the current version and confirm that it's still not working?

If so, please enable the debug logging option under behavior, apply, then bring up the tile dialog, tile a window with the shortcut, manually close said dialog, and attach the resulting kwin logs.

imthenachoman commented 5 months ago

In release 0.5? Where? How do I update or get it?

And I don't see debug logging option anywhere.

image

zelch commented 5 months ago

Alright, you're definitely not running the current version.

If you start up Discover, then under Update (bottom left of the window) you should have the option to update kwin extensions, including Exquisite.

imthenachoman commented 5 months ago

Nope. Nothing for Exquisite. When did you update it?

I updated to 0.5 on May 17. Then I saw your comments about fixing that bug. But I didn't see anything about an update? The store still has 0.5.

image

zelch commented 5 months ago

Ah, hrm.

@qewer33 Could we get a 0.6 release with the current git head? :)

I've got some minor changes I still need to write commit messages for, but nothing even remotely critical.

(It's a matter of documentation, and of attempting (and largely failing for Reasonsâ„¢) to format the case where multiple modifiers are used for a tile shortcut.)

imthenachoman commented 5 months ago

No need to push a new release on my account. I was just hoping to see the lines changed to fix that bug so I could make them on my end.

qewer33 commented 5 months ago

Sorry for the inactivity, finally free from my university exam and got time to work on Exquisite again :sweat_smile:

@zelch do you have anything commit/PR? If not I'll upload a new release

imthenachoman commented 4 months ago

Is there anything I can do to get the auto close after keyboard shortcut tiling to work? Right now it will tile when I select the keyboard shortcut, but the Exquisite window stays open.