gerritdevriese / kzones

KDE KWin Script for snapping windows into zones
https://store.kde.org/p/1909220
GNU General Public License v3.0
238 stars 14 forks source link

KZones Shortcuts do not work on Plasma 6 #62

Closed mphartzheim closed 3 months ago

mphartzheim commented 4 months ago

Nobara 39 updated to KDE Plasma 6 and the KZones shortcuts are no longer functioning.

I'm a linux newbie so please let me know how I can help you.

Thanks!

gerritdevriese commented 4 months ago

KZones will not work at all on Plasma 6 until it is rewritten because the KWin API changed a lot 🙁 I'll see when I can make time for this.

mphartzheim commented 4 months ago

Thanks for the update!

kotek14 commented 3 months ago

KZones will not work at all on Plasma 6 until it is rewritten because the KWin API changed a lot 🙁 I'll see when I can make time for this.

Thank you for the update. Fingers crossed. I've been relying on KZones for over a year. It is hands down the best snap layout replacement on Linux.

fynzhak commented 3 months ago

For anyone watching this issue, I opened a PR with my attempt to port to Plasma 6. It's working for me so far, but I can't guarantee I didn't introduce any regressions.

Maybe it's helpful though!

https://github.com/gerritdevriese/kzones/pull/63

gerritdevriese commented 3 months ago

For anyone watching this issue, I opened a PR with my attempt to port to Plasma 6. It's working for me so far, but I can't guarantee I didn't introduce any regressions.

Maybe it's helpful though!

63

Thank you so much 🙏 Just tested it and seems to be working fine and I can't find any regressions. I will accept your PR right away so other people can test.

I actually also started porting a few days ago, but then I fell into a rabbit hole that is the KWin Tiling API and got somewhat demotivated 😅

principis commented 3 months ago

Thanks for your work on this!

There seem to be some issues when 0.7 is installed system wide in /usr/share/kwin/scripts, but not when installed per-user in ~/.local/share/kwin/scripts. (0.6 works fine)

error message:

Mar 31 23:13:20 MarkVI kwin_wayland[83805]: kwin_scripting: Component failed to load:  (file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml: Library import requires a version, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml: Library import requires a version, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml: Library import requires a version, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml: Library import requires a version, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml:5:28: Library import requires a version
                                                import org.kde.kirigami as Kirigami
                                                                           ^, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml: Library import requires a version, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml:7:37: Library import requires a version
                                                import org.kde.plasma.components as PlasmaComponents
                                                                                    ^, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml:8:31: Library import requires a version
                                                import org.kde.plasma.core as PlasmaCore
                                                                              ^, file:///usr/share/kwin/scripts/kzones/contents/ui/main.qml:9:41: Library import requires a version
                                                import org.kde.plasma.plasma5support as Plasma5Support
                                                                                        ^)

I would like to package kzones for Fedora, but unfortunately this blocks me from doing so... I haven't tested it on Plasma 6, so maybe it's only an issue on Plasma 5 :slightly_smiling_face:.

fynzhak commented 3 months ago

@principis , sorry, I think that's my mistake. I removed the version numbers since it was giving me some trouble initially, but perhaps I should have left them in. Also, this was ported to Plasma 6 so I'm not sure if it will work at all on Plasma 5. gerritdevriese updated the README to mention 6 or higher.

@gerritdevriese , should the versions be added back though? Another folly of me not fully understanding QML :sweat_smile:

principis commented 3 months ago

@fynzhak No worries! Also, it definitely doesn't have to work on Plasma 5 :slightly_smiling_face:. I intend to test on Plasma 6, but since the per-user version works fine, I figured, let's post it here already.

principis commented 3 months ago

@fynzhak Seems to work on Plasma 6! Sorry for the confusion.

gerritdevriese commented 3 months ago

@gerritdevriese , should the versions be added back though? Another folly of me not fully understanding QML 😅

Nah I don't think so, I just removed them from the Indicator as well, doesn't seem to have any impact on Plasma 6.


Anyway, if no one encounters any issues in the following days I will update the KDE Store page.

diederikgist commented 3 months ago

Just upgrade this weekend to Plasma 6. Was trying to get KZones back on track. I just installed the latest version from git (few hours old). But I'm also experiencing issues with my shortcuts. Toggle throught my layouts (control alt + D) works, but putting my active window to a spot in my layout (control alt 1/2 etc) does nothing. I also tried binding this shortcut to a different key combination without success.

Anything else I can try?

gerritdevriese commented 3 months ago

Just upgrade this weekend to Plasma 6. Was trying to get KZones back on track. I just installed the latest version from git (few hours old). But I'm also experiencing issues with my shortcuts. Toggle throught my layouts (control alt + D) works, but putting my active window to a spot in my layout (control alt 1/2 etc) does nothing. I also tried binding this shortcut to a different key combination without success.

Anything else I can try?

Seems that during the port those shortcuts were accidentally renamed to Move active window to # instead of Move active window to zone #, so you will probably have some duplicate shortcuts in your shortcuts manager:

image

I've fixed the naming on the main branch but if you don't want to rebuild you can rebind the shortcuts manually.

Btw you can run qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.cleanUp if you want to get rid of those duplicate shortcuts.

fynzhak commented 3 months ago

Ooops! Looks like I missed selecting a word when copying the string. Good catch!

diederikgist commented 3 months ago

After a git pull my shortcuts are working again! Thanks for you efforts! :+1:

gerritdevriese commented 3 months ago

Version 0.7 has been released on GitHub and the KDE Store, closing this issue.