iberianpig / fusuma

Multitouch gestures with libinput driver on Linux
MIT License
3.63k stars 146 forks source link

[Feature request] Slant(diagonal) swiping gestures #310

Open IceAsteroid opened 1 year ago

IceAsteroid commented 1 year ago

Is your feature request related to a problem? Please describe. Not a problem of fusuma by itself, but it conflicts with libinput-gestures's "slant" swiping gestures.

Describe the solution you'd like Slant swiping gestures such as: Swipe from left to right but slantly up/down Swipe from right to left but slantly up/down

Why I post this issue and not just use libinput-gestures instead, since libinput-gestures supports this feature I badly need continuous scrolling for switching workspaces in Sway, but libinput-gestures doesn't support this, plus it won't likely be supported in the foreseeable future.

As the developer of libinput-gestures has said that project is only as a stop-gap measure before things work natively. Here: https://github.com/bulletmark/libinput-gestures/issues/78

And the most important thing is, fusuma conflicts with libinput-gestures, as the former interprets those slant gestures as perpendicular.

For example, if I set a slant left gesture for firefox in libinput-gesture, and a perpendicular left gesture for workspace in fusuma, and I make a slant left gesture on touchpad, they'll all be triggered at the same time.

Why this is necessary Two finger swiping gestures are already used for scrolling.

Three finger swiping gestures are often used for workspace switching.

Four finger swiping gestures are often used for calling system utilities such as application launcher and workspace overview panel.

It would be really handy if slant swiping gestures could be added for navigation in a browser, for instance.

Any ideas?

iberianpig commented 1 year ago

Thanks for your feature request.

While the implementation itself might not be difficult, there could be an increased number of false detections for the existing up, down, left, and right swipes on smaller touchpads.

I'll offer another idea. Make the most out of fusuma's plugins.

This is how I do it. It's very convenient :pig:

IceAsteroid commented 1 year ago

@iberianpig Hi, thank you for the kind reply and patience! :)

Yes, that's good enough by default, but there are cases where these gestures are handy.

In my case:

This setup is, I don't know what to say, probably to me, it's the most elegant and efficient way to have.


I have a swaywm config which is a bit complex yet efficient(opinionated), where I can have more than 10 workspaces, or any number of them set by set..

Not just to switch between them back and forth, I also need a pair of gestures to switch between the same "digits", for example, 17th workspace to 27th or N7th workspace.

It's probably tricky for a small touchpad to use slant swiping gestures, but isn't it feasible to be enabled when people need it?

About using app-specific gestures/with modifiers I also have a script to disable cursor movements in sway when typing and the cursor needs to be enabled by the win key.

So if it needs to move a cursor out of the app, then to use to the same gesture for other purposes, and it would be hassle enough, since gestures can still be used when touchpad events are disabled for sway.

For example:

https://github.com/iberianpig/fusuma/assets/90975914/74a03428-955e-4d4e-aa6e-89f008fa9f92

Conclusion Mostly, it's just my own problem, but here I just let you guys know the cases of why sometimes slant swiping gestures are useful for.

Since, it's more intuitive to use than switching between 3 and 4 finger gestures frequently.

For instance, 3 finger gestures for frequent tasks such as switching tabs in browser and workspaces back and forth, 4 finger for less-frequent tasks such as launching app launcher and workspace overview panel


Sorry for the disturbance, It's just a suggestion.

IceAsteroid commented 1 year ago

Any good news?

iberianpig commented 12 months ago

I am not highly motivated to implement diagonal swipe gestures. This is because I am concerned about false positives in the case of Fusuma, which defaults to thresholds. If you need to, please try to create a pull request for PoC.

IceAsteroid commented 11 months ago

Fine, I respect it and your choice. I'll try to create it :)


In case of that if anyone is good at Ruby and interested to implement this functionality, please, do not hesitate to do it.

As I'm not familiar with Ruby, and still in the process of learning Python.

I'm also curious on Ruby, but since I'm already half in the process of learning Python, so, I need to finish it first, otherwise, I'll not be confident enough to provide a solid implementation of diagonal(slant) swiping gestures :)

Anyway, thank you all and @iberianpig for the great work, I really appreciate it :)