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

scroll or middle click to cycle layouts #44

Open imthenachoman opened 11 months ago

imthenachoman commented 11 months ago

Right now you can use non-primary mouse button to either toggle zone activation or cycle. My thought is, one of these options would be good/better:

  1. After zone activation, it can then be used to cycle between layouts. So you start dragging and then right click to activate Kzones, then right click again to cycle layouts.
  2. Use non primary mouse button to toggle zone activation and then mouse wheel to cycle between layouts.

Also, the modifier/non-primary feature only works on X11 and not Wayland. Will this also be fixed when Wayland support is better or it's not possible at all with Wayland?

I prefer Wayland but can go back to X11 if that's the only way to use these two features.

gerritdevriese commented 11 months ago

This is a great idea, but at the moment I can't figure out any way to do this on Wayland, I also daily drive Wayland, so I don't really want to add X11-only features.

I tried using the "keystate" engine from PlasmaCore.DataSource, but I don't get any data on Wayland, which is weird because the default KDE lockscreen also uses this to get the Caps Lock state, so it seems to be a KWin API limitation?

If someone can figure out a way to reliably signal key & mouse events on both X11 and Wayland, let me know.

imthenachoman commented 4 weeks ago

My fix for this was to use a tool to remap mouse buttons to keyboard shortcuts and use KDE to map those keyboard shortcuts to kzone features.