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

Activation based on cursor speed #29

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Familex
Copy link

@Familex Familex commented Dec 25, 2024

will fix #3.

At the moment it does not always triggers, can be solved by increasing the corner size.

I was thinking about the idea with several surfaces (#3 (comment)). But Event::Enter does not give cursor position, which may cause poor accuracy (maybe). And it will also significantly complicate the code.

I use this config for testing:

[flick_command_test]
flick_command = [ "notify-send", "FLICK"]
flick_activation_speed = 1.0
locations = ["bottom_left"]
size = 40
timeout_ms = 0

I named the activation action as flick. Correct me if it sounds bad.

Also, my changes could break activation by timeout, I haven't checked yet.

config: flick_command, flick_activation_speed;
activation based on last and current motion event
@AndreasBackx
Copy link
Owner

Would you be able to describe how the feature works? Being able of explaining it here would allow us to additionally explain it in the README as well. This makes reviewing easier too.

I think this is a good feature to have. I'll refrain from commenting too much until you've made the PR ready for review. Thanks already for the work!

@Familex
Copy link
Author

Familex commented Dec 26, 2024

@AndreasBackx While I was formulating an answer to your question, I went into KDE to take a closer look at how it works. It turns out I was wrong about how "Screen Edges" works in KDE...

To emulate their work, the following config is enough:

[example]
enter_command = ["command"]
locations = ["bottom_left"]
size = 1
timeout_ms = 0

Now I myself don't see the point in activating the corner by cursor speed.

I think this draft can be remade to a little refactoring.

At this moment events handled by pulling, which gets crazy with timeouts close to zero. That's why the minimum value 5 was made, I believe.

I want to make it possible to completely remove the timeout in config, or even make it zero by default.

@Familex Familex changed the title Activation based on cursor speed (like on KDE/GNOME) Activation based on cursor speed Dec 27, 2024
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.

[Enhancement] activation based on cursor speed
2 participants