Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
IceAsteroid opened this issue Sep 12, 2023 · 5 comments
Open

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

IceAsteroid opened this issue Sep 12, 2023 · 5 comments

Comments

@IceAsteroid
Copy link

IceAsteroid commented Sep 12, 2023

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: bulletmark/libinput-gestures#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?

@IceAsteroid IceAsteroid changed the title [Feature request] Slant gestures [Feature request] Slant swiping gestures Sep 12, 2023
@iberianpig
Copy link
Owner

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.

  • Set the 3-finger gestures for each application.
    • Use fusuma-plugin-appmatcher to configure settings for each application.
  • Assign the 4-finger gestures to workspace or window manager level operations.
    • Use the default swipe without modifier keys for workspace movement, and with fusuma-plugin-keypress, assign window operations and other utilities while holding Shift or Super.

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

@IceAsteroid
Copy link
Author

IceAsteroid commented Sep 12, 2023

@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:

  • Three-finger slant swiping gestures for switching through tabs in browser, right_up to forward, left_down to backward; left_up to open new tab near current tab, right_down to close current tab.

  • Two-finger rotation gestures for tab management in browser, clockwise to refresh current tab, anti-clockwise to reopen the previous closed tab.

  • Three-finger perpendicular swiping gestures for switching through workspaces in Sway, right for next, left for previous, up to for example 12 to 22 workspace, down to 22 to 12 workspace with swayWorkRoom.sh.

  • Four-finger for system utility invocations, such as program launcher, workspace overview panel, notification center, etc.

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:

screencast.mp4

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
Copy link
Author

Any good news?

@iberianpig
Copy link
Owner

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
Copy link
Author

IceAsteroid commented Oct 11, 2023

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 :)

@IceAsteroid IceAsteroid changed the title [Feature request] Slant swiping gestures [Feature request] Slant(diagonal) swiping gestures Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants