emersion / slurp

Select a region in a Wayland compositor
https://wayland.emersion.fr/slurp
MIT License
956 stars 57 forks source link

Differentiate mouse clicks #122

Open jtagcat opened 1 year ago

jtagcat commented 1 year ago

I'd like to do different things based on whether the rectangle was made with left, right (or middle, or mouse5) click.

apprehensions commented 4 months ago

Such as?

jtagcat commented 4 months ago

Don't remember any more, 2 years ago.

Examples out my butt: screenshot to clipboard, edit it, capture in n seconds (for dropdowns), screenshare region

apprehensions commented 4 months ago

Only issue with this is it has to be parsed accordingly. For example pressing mouse 5 on selection can output

100x100 100,100 5 and then it is up to the parser such as a script to remove the mouse identifier and then do actions with it and the remaining geometry.

jtagcat commented 4 months ago

A CLI switch will do, then it doesn't need to be a breaking change. An abstract minor downside is that the theoretical scripts would then possibly be incompatible out of the box with other scripts.

apprehensions commented 4 months ago

Which is why it'd need to be specified via a flag.