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

[Suggestion] Smooth scrolling #62

Closed
Bellavene opened this issue Jan 5, 2025 · 8 comments
Closed

[Suggestion] Smooth scrolling #62

Bellavene opened this issue Jan 5, 2025 · 8 comments

Comments

@Bellavene
Copy link

Bellavene commented Jan 5, 2025

I believe you should merge the desktop scrolling animation with that repo

@mogenson
Copy link
Owner

mogenson commented Jan 6, 2025

That's a good suggestion! I'll see what I can put together.

@mogenson
Copy link
Owner

@Bellavene please try out PR #63 for smooth scrolling windows.

Some notes:

  • Set PaperWM.swipe_fingers = 3 (or some value greater than 1 finger before calling PaperWM:start() in your config. The default value is 0 fingers, which means swiping is disabled.
  • Disable or reassign any conflicting MacOS gestures that use the same number of fingers. Eg. swipe between Mission Control spaces.
  • Optionally, set PaperWM.swipe_gain to some positive number. The default is 1.0. This is how far the windows move relative to the swipe gesture distance.
  • This is multi-touch trackpad only. I don't have a good way to handle mouse scroll wheels because there's no begin or end to a scroll wheel event.

@mogenson
Copy link
Owner

mogenson commented Jan 10, 2025

If you're on MacOS 15 hang on. There seems to be an issue with the swipe gesture recognizer. It works ok on MacOS 14.

Edit, should be working on MacOS 14 an 15 now.

@zolrath
Copy link

zolrath commented Jan 12, 2025

Hello!
I've been trying this out and the one thing that makes it feel less natural to me compared to ScrollDesktop.spoon is the lack of momentum.

With ScrollDesktop I can slowly scroll or fling myself quickly to get to something I know if a few screens away and it feels very nice. With this implementation if I do a fling/quick scroll motion the scrolling stops the second my fingers are off the track pad.

Is there any chance of getting momentum added in here?

Thanks for your work!

@mogenson
Copy link
Owner

@zolrath I'd have to build a small physics engine to get the same momentum behavior. I'll consider it as a future enhancement.

This is because I wanted to be able to set a unique gesture for PaperWM.spoon (eg 3 or 4 finger swipe) without requiring a keyboard modifier. The only way to get this info on MacOS is to do your own gesture recognition based on trackpad touch locations.

ScrollDesktop is using the MacOS scroll wheel events (which are emulated by a two finger touchpad swipe). But you should gate that by holding down a keyboard modifier key, unless you want windows to move every time you do a horizontal scroll.

@Bellavene
Copy link
Author

@Bellavene please try out PR #63 for smooth scrolling windows.

Some notes:

  • Set PaperWM.swipe_fingers = 3 (or some value greater than 1 finger before calling PaperWM:start() in your config. The default value is 0 fingers, which means swiping is disabled.
  • Disable or reassign any conflicting MacOS gestures that use the same number of fingers. Eg. swipe between Mission Control spaces.
  • Optionally, set PaperWM.swipe_gain to some positive number. The default is 1.0. This is how far the windows move relative to the swipe gesture distance.
  • This is multi-touch trackpad only. I don't have a good way to handle mouse scroll wheels because there's no begin or end to a scroll wheel event.

@mogenson I just appreciate your project. Have found that repo and immediately was thinking about PaperWM. Personally I use Yabai, would be glad to use yours, but there are things that don't suit fully my user style. Maybe it will change in time : )

@mogenson
Copy link
Owner

Ok no problem. I'm going to leave this issue open while I test the changes and let them soak. I'll close this issue when the PR is merged.

@mogenson mogenson reopened this Jan 14, 2025
@mogenson
Copy link
Owner

Merged and added a demo video

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

3 participants