Skip to content

Draft: Add 1:1 swipe gestures to switch workspaces#309

Closed
TheSunCat wants to merge 1 commit intohyprwm:mainfrom
TheSunCat:main
Closed

Draft: Add 1:1 swipe gestures to switch workspaces#309
TheSunCat wants to merge 1 commit intohyprwm:mainfrom
TheSunCat:main

Conversation

@TheSunCat
Copy link
Copy Markdown

Describe your PR, what does it fix/add?

I wrote this to enable one-to-one touchpad gestures to switch workspaces as it is a really nice feature to have on laptops.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I have not tested this with multiple monitors, but presumably it should work fine as it uses the same animations as normal workspace switching.
The gesture is broken if you try to switch between two workspaces that skip an ID, such as going from 3->5. This would have to be fixed before merging.

Is it ready for merging, or does it need work?

No: the bug described above needs to be fixed, and this needs testing under more configs than my own. It would also be a good idea to make this feature configurable (number of fingers, on/off, sensitivity).
Additionally, I left some comments marked TODO which indicate bits of code that, though functional, might need rethinking.

@fufexan
Copy link
Copy Markdown
Member

fufexan commented Jul 5, 2022

Damn you were fast with it. I'll test and report back.

@Kara-Zor-El
Copy link
Copy Markdown

This is a great proof of concept. It does have many issues suck as not having any config options as far as i can tell and being glitchy. Also 2 monitors causes many graphical glitches and your mouse to teleport to the other monitor. it also crashes a lot with multi monitors. it may be a good idea to turn this into a draft because of the lack of polish with this but great start :)

1x1_touchpad_gestures.trimmed.mp4

@TheSunCat TheSunCat changed the title Add 1:1 swipe gestures to switch workspaces Draft: Add 1:1 swipe gestures to switch workspaces Jul 6, 2022
@TheSunCat
Copy link
Copy Markdown
Author

Thanks for testing! I didn't expect it to crash with multiple monitors... I'm guessing there's an issue with how it searches for the previous/next workspace to go to when there's multiple monitors.
I'd mark it as a draft if I knew how, but yes it very much needs cleaning up as well as configuration options.
I was thinking of allowing the number of fingers to be configured, sensitivity, and a general toggle for the feature, but not sure what else.

Does it crash at all when using a single monitor? It's been fully stable in my testing.

@fufexan fufexan marked this pull request as draft July 6, 2022 21:32
@vaxerski
Copy link
Copy Markdown
Member

vaxerski commented Jul 7, 2022

closing as swipes have been added

@vaxerski vaxerski closed this Jul 7, 2022
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

Successfully merging this pull request may close these issues.

4 participants