emersion / slurp

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

Allow skipping the click to select #73

Closed Kommynct closed 4 years ago

Kommynct commented 4 years ago

This would be useful for the output selection mode.

tmccombs commented 4 years ago

Could clarify what you mean by that? What exactly is the behavior you want?

Kommynct commented 4 years ago

Sorry, my bad, for example: on sway i have this setup

bindsym --no-repeat mod1+mod4+p exec grim -g "$(slurp -o -b 00000000 -s 00000000 -w 0)"

However, this could be optimized by making it so that when i push the keybind it instantly screenshots the output the cursor is on, rather than after a click.

Is that completely clear?

tmccombs commented 4 years ago

Ah, I think that makes sense. You want to use the current location of the mouse as input, rather than the location when the user clicks?

Kommynct commented 4 years ago

Exactly. Ideally this'd also be the only appearance flag in the config as it'd skip the need for drawing anything.

Would also be good for color pickers possibly.

emersion commented 4 years ago

The output the cursor is on is available via swaymsg. There's no need for slurp here.

Kommynct commented 4 years ago

...i'm dumb

emersion commented 4 years ago

Eh, no worries :)