AndreasBackx / waycorner

Hot corners for Wayland. Create anchors in the corners of your monitors and execute a command of your choice.
MIT License
86 stars 6 forks source link

[Enhancement] activation based on cursor speed #3

Open notthewave opened 3 years ago

notthewave commented 3 years ago

Why?

AndreasBackx commented 3 years ago

Thanks for the idea. Though I'm unsure this would be feasible. Waycorner is relatively simple which is why I decided to make it. It simply adds some squares and detects if there is a cursor there after which it does a simple timeout. Implementing this would mean that we might need to add a large layer that tracks the mouse the whole time so we know its speed when entering the the hot corner. That would likely bring more complexity with it as well. I'd be up for reviewing a PR to add this functionality and willing to comment on some design proposals.

Additionally, I'm not entirely sure how multiple layer shells behave on the same layer. Though from what I've seen, it should be fine as I think they override one another. Though worth confirming this.

Could you also give some use-cases where this would be useful?

notthewave commented 3 years ago

Well maybe 20x20 (default is enough). My idea: make two areas which detect a cursor:

 1   2
___________________
|_| | |
|___| |
|_____|
|
|
AndreasBackx commented 3 years ago

That proposal looks like a good compromise. Do you have any use cases for this?

notthewave commented 3 years ago

I'd just replace the old mechanism, as it is sometimes triggered when I don't want it. This might also make it easier for touch gestures, although I sure there are better options for that.

AndreasBackx commented 3 years ago

Okay, though what makes you think that this would be an improvement? Why aren't you increasing the timeout if it triggers too quickly? How would the proposed solution solve your problem?

notthewave commented 3 years ago

Well if it's not nearly instant I might as well use a shortcut. Also, some compositors rely on dragging windows to the edges (for tiling), and it might conflict with that, but that's nothing that affects me. — I admit this is nitpicking at this point.

AndreasBackx commented 3 years ago

My apologies, I'm just trying to understand what would be different in behaviour when there was the ability to use the speed of the mouse. Could you give an example of something that would be possible that isn't possible before? I don't fully understand the use-case.

notthewave commented 3 years ago

I don't believe this enables anything that was not possible before. It was my mistake labeling it as a feature request in the first place. I guess this would need to be tested to see whether it improves usability or not.

My apologies for not expressing the intent of this issue clearly enough and making this such a long-winded conversation.

You can close this if you don't believe this is a good idea or a valid concern.

AndreasBackx commented 3 years ago

Don't worry about it. 🙂 If you're willing to make a PR for it, I can perhaps see the benefit of the enhancement/feature (I just added the label enhancement because it's a default tag, there is no feature tag by default). It might be a good or even great idea. Though for now I don't see what it offers in exchange for the added complexity. Thank you for the idea though. I'm fine keeping it open in case you or someone else comes up with a use-case that benefits from this. I primarily use waycorner to lock my monitors when I leave my desk.