As many of you, I am also reconsidering the switch to Wayland for the upcoming Plasma 6 release.
I appreciate the work done on touchpad gestures, especially after having spent a decade on a macbook. Linux has in fact worsened my hook to gestures when I have discovered touchegg+touché (X11 session) for full customizability.
I don’t mind adopting the native Plasma gestures, my question is about importing a special one I love on top of them: (4-finger) pinch in to close a window (and out to turn the screen off).
From what I can read, global gestures (as global shortcuts apparently) would be very difficult to implement in Wayland as each app should implement them.
I gave it a try: in a Wayland session (Plasma 5.27 and 6), most of my custom gestures work, except that Plasma’s gestures are also triggered (clash = double action). The pinch to close, however, works only in non-KDE apps (through XWayland?).
I would appreciate any insight into this blurry topic! Things to try, where to look, etc.
I know the kde folks say they plan to implement customizable trackpad gestures. Touchegg only works on x11 right? Perhaps that is the reason why it is only affecting xwayland apps?
Their left to right gestures are backwards from gnome and I had asked if it were possible for me to change them. The answer I got was no → BUT admittedly that was a number of months or maybe even a year ago. It may have changed. But it does not sound like gesture customizability will likely be available yet (ever? If someone smart enough wants it, it probably will).
The problem is, you’ll be stuck with their opinionated implementation.
Wayland makes it impossible for third party programs to do this. Only the compositor can do it, simply because it ignores to follow the strict Wayland protocol.
Everyone should get used to that, as Wayland gets more and more adoption.
If Wayland was designed my sane people, you could have gestures handled by a separate program from the compositor. But given the fact that it is not, you are vendor-locked. It’s the same reason I can’t have Xeyes on Wayland.
Oddly enough, GNOME’s wayland gestures were the reason I left plasma. It completely changed my laptop workflow.
Flip side if it’s only wayland. . . then the gestures would be the same, but since they are reversed it must be a plasma setting somewhere. Side note I haven’t tried them on 6 yet, but in 5 wayland they were reversed.
Wayland is just a protocol. It is up to each compositor to implement the entirety of it.
X has a display server, and compositors for X are really simple. Wayland compositors are very complicated because they have to implement everything, including gestures. So you have what your compositor supports.
If my compositor supported animated eyes that follow the mouse cursor, I could have that under Wayland. But I can’t have a third party program like Xeyes doing that, just like you can’t have a third party program handling your gestures. You’re stuck with the implementation your DE gives you, there is no modularity, and there never will be, by design.
I’ve implemented on my own a universal one config with fusuma + ydotool.
I’ve looked at the libinput debug, it’s by default has a recognition of different kinds of swipes, pinches and etc. So it’s not that hard to make something even simpler just based on it.
I got a step closer thanks to this post and using the dotool package instead of ydotool in combination with fusuma (touché seems to work as well).
After several tests, here is what worked for me:
Install dotool from AUR
Activate it following the two command indicated in man dotool and test the different commands, such as --listkeys, try in the terminal echo key alt+F4 | dotool to see if it works.
Install rubygems, and fusuma with gem install fusuma
WARNING: no use of sudo, nor of the fusuma package in AUR!
Add the path to fusuma binary to $PATH in .bashrc, as recommended when installing fusuma.
Add this same path to autostarted apps in settings (ticking the “launch from terminal” option).
Add your custom commands to fusuma’s config file (find it with fd --hidden config.yml), and reboot. For instance:
Caveat: touchegg is not supposed to work in a Wayland session, and I notice that it crashes after a few hours.
The only missing part for a full customisability would be to properly override Plasma’s gestures, instead of just clashing with them (both are executed). I guess we need to wait this Plasma feature is implemented.