waycorner icon indicating copy to clipboard operation
waycorner copied to clipboard

[Feature request] Actions triggered by mouse buttons

Open w-jablonski opened this issue 2 years ago • 1 comments

Be able to trigger actions by using mouse buttons/wheel while the cursor is in a hot corner/edge.

Use case: lesser chance of accidental triggers, than when using mouse hover.

w-jablonski avatar Jan 29 '23 17:01 w-jablonski

Reopening now, since I need this. Use case: to use middle click on right-hand edge in order to mute/unmute the sound. Useful to mute youtube adds, whose 'Skip' button is placed near there. Thanks if anyone finds time to work on this!

w-jablonski avatar Feb 27 '24 19:02 w-jablonski

I'm curious about this request because it confuses me. It seems like what you're requesting defeats the whole point of hot corners/edges? If you want to be able to click on the right edge, I don't understand what the use of waycorner would be and why you can't just...click on it? I've been using waycorner daily and would like to help you if I can, I just don't really understand what you need.

ghost avatar Jul 25 '24 23:07 ghost

@w-jablonski

https://github.com/user-attachments/assets/305dd466-e5e5-4a51-a8ed-ed7436d98c55

Is this what you meant? You don't need to click anything, just use a command to toggle mute in your waycorner config. I don't even pay attention to the size or margin options because they honestly don't seem to do anything for me. But it's easy to control sensitivity with just the timeout_ms option.

To prevent accidental edge triggers and to prevent edges from interfering with corners, use:

timeout_ms=350 or higher for edges
timeout_ms=100 for corners

Here's the config I used for the right edge in the video. If you don't have the wpctl command, you can get it by installing the wireplumber package. Hope this helps! If this isn't what you were looking for, I can try to help you troubleshoot a different solution.

[right]
    command=["wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle"]
    locations=["right"]
    size=2
    margin=2
    timeout_ms=350
[right.output]
    description = "eDP-1"

Sidenote @AndreasBackx : I think you could safely update the README for waycorner to note that it does work on Hyprland. I've been using it without any issues for at least a couple of months. It is also still working well after the recent Hyprland transition from wlroots to aquamarine. Thanks for developing and maintaining this btw, I use it constantly!

ghost avatar Jul 26 '24 05:07 ghost

I'm using it on Hyprland myself. Eh, it mentions the protocol and I don't think a specific mention of each compositor matters much. 🤷‍♂️

This is very unlikely to be implemented because the purpose of hot corners is not to click anything. I'll close this for now, but feel free to leave comments if you think there is a good usecase.

AndreasBackx avatar Jul 28 '24 20:07 AndreasBackx

Thanks for the comments. Yes, that's exactly my use case. Hovering the mouse is not good because of the accidental triggers, no matter the timeout. Mind you, right edge is where scrollbars are, so you typically hover your mouse there for prolonged time. Other edges are no better for a chaotic mouse user that I am ;-) Why not click? It feels natural.

Plus, this gives some extra flexibility: you could use wheel for e.g. volume. For me it matters a lot: reaching edge with your mouse (then using wheel) doesn't require even looking there. While reaching towards some volume-changing applet on the status bar does require looking there AND moving the mouse slowly for precision. Very annoying. And on some other edge one could use wheel to e.g. scroll to top/bottom or sth else. How convenient.

w-jablonski avatar Aug 02 '24 01:08 w-jablonski

@w-jablonski if you want mouse clicking/scrolling, why not add something to the bar application you're using? There are so many bar-type applications that can provide feedback and actually support the features you want.

Right now, it seems like that usecase is fulfilled by bars. The usecase for waycorners is "hot corners" and implementing functionality like this seems like a slippery slope.

AndreasBackx avatar Aug 03 '24 15:08 AndreasBackx

Thanks. If you indeed know a wayland bar that can use whole edges rather than applets, can you name it please.

w-jablonski avatar Aug 04 '24 02:08 w-jablonski

Thanks. If you indeed know a wayland bar that can use whole edges rather than applets, can you name it please.

waybar and polybar are both extensible and have great documentation, but you'll have to spend time configuring them.

I don't think waycorner is appropriate for what you're wanting because it kind of defeats the whole point of hot corners. You could do it with some hacky scripting, but it sounds like you'd be better off just using a program that's actually been developed for your use-case. mouse-actions offers the functionality you're looking for.

ghost avatar Aug 04 '24 11:08 ghost