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] Take cursor acceleration into account when revealing hidden dock #30

Closed
zoro11031 opened this issue Nov 12, 2022 · 17 comments · Fixed by #31
Closed

[Feature request] Take cursor acceleration into account when revealing hidden dock #30

zoro11031 opened this issue Nov 12, 2022 · 17 comments · Fixed by #31
Labels
enhancement New feature or request

Comments

@zoro11031
Copy link

Suggestion: When the dock is in autohide mode, do not unhide the dock unless the mouse reaches a certain threshold of downwards velocity when it is moving to the dock's trigger area.

Benefit: This will prevent users from accidentally revealing the dock and obscuring the bottom of windows they may be trying to work with during regular use.

Not sure if this is feasible/possible to implement in this project, but just a suggestion because it works really well in GNOME's dock to shell extension's implementation of it.

@nwg-piotr
Copy link
Owner

No idea on how to measure the pointer speed here, as I just use the enter-notify-event. I could only think about adding some delay, and not showing the window if the pointer leaves the hotspot area before the delay ends.

@nwg-piotr
Copy link
Owner

nwg-piotr commented Nov 12, 2022

After some further consideration (during boring shopping), I think I could, to some degree, measure the speed the hotspot was entered with. I need to install GNOME and see what you're talking about, in order not to implement the feature I haven't even seen.

@nwg-piotr nwg-piotr added the enhancement New feature or request label Nov 12, 2022
@zoro11031
Copy link
Author

My roommate has GNOME on his setup, I’ll ask him if I can screen record the dock behavior if you’re interested. A slight delay would also work well!

@zoro11031
Copy link
Author

Here’s a video of the behavior, sorry about the poor quality, OBS on GNOME wasn’t cooperating with Pipewire and I didn’t want to spend too much time troubleshooting a DE I don’t use: https://youtube.com/shorts/vUA6-XJ8OfY?feature=share

@nwg-piotr
Copy link
Owner

I imagined it something like this. Will try to reproduce this behaviour, but I'm not sure if what I'm thinking about is going to work well. It'll turn out soon.

@nwg-piotr
Copy link
Owner

So, it could be implemented this way: https://youtu.be/DAP22C-aGF0

What do you think?

@zoro11031
Copy link
Author

That is exactly what I had in mind! 👍

@nwg-piotr
Copy link
Owner

It needs some more work, but should be ready soon.

@zoro11031
Copy link
Author

That’s awesome man, thank you so much for the great work!

@nwg-piotr
Copy link
Owner

I'm not 100% happy about it, but it works. You may check the add30 branch.

@zoro11031
Copy link
Author

zoro11031 commented Nov 14, 2022

I'm having trouble building it, but that's probably an issue with me not the project, I very rarely build things from source straight from github so I'm probably doing something wrong. When I run make build after running make get I get the following errors:
./tools.go:69:12: cannot use window.Change (variable of type sway.WindowEventChange) as type string in struct literal ./tools.go:87:33: cannot use eventHandler (variable of type swayEventHandler) as type sway.EventHandler in argument to sway.Subscribe: swayEventHandler does not implement sway.EventHandler (missing BarStateUpdate method) ./tools.go:117:33: cannot use eventHandler (variable of type swayEventHandler) as type sway.EventHandler in argument to sway.Subscribe: swayEventHandler does not implement sway.EventHandler (missing BarStateUpdate method) make: *** [Makefile:11: build] Error 2

Seems like some kind of mismatch with my sway version, maybe?

@nwg-piotr
Copy link
Owner

No idea. Are you on Arch Linux? Do you use nwg-shell or just the dock? One way or another, it must wait till tomorrow, as it's almost 4 am in my place.

@zoro11031
Copy link
Author

I'm on Arch and have the whole nwg-shell installed, but not using nwg-panel. No worries man!

@zoro11031
Copy link
Author

zoro11031 commented Nov 15, 2022 via email

@nwg-piotr
Copy link
Owner

You're welcome. Thanks in advance for further feedback. :)

@zoro11031
Copy link
Author

I just wanted to drop back and say that it works great! Thank you again man! This really improved the usability of the dock for me

@nwg-piotr
Copy link
Owner

nwg-piotr commented Nov 16, 2022

I'm glad you like it. I'm just adding corresponding settings to nwg-shell-config:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants