emersion / slurp

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

Selection border should not overlap the selection #44

Open 9ary opened 4 years ago

9ary commented 4 years ago

Currently, slurp centers the border on the edge of the selection, rather than pushing it to the outside. This is especially noticeable when piping in predefined areas for selecting whole windows. This obscures the selected content when using thicker borders, and it's a bit confusing. Both slop and hacksaw draw the border around the selection with no overlap.

emersion commented 4 years ago

Yes. Here's the patch fixing this for mako: https://github.com/emersion/mako/commit/f8ddfe048072d85e1d78cb486a56634b1b93e200

9ary commented 4 years ago

There is one case I didn't consider when opening this issue: if you're trying to select an entire output and the border is outset from the selection, you won't be able to see it, so maybe this should be customizable.

tmccombs commented 4 years ago

I tried implementing this, and found another weird side-effect: the crosshairs are now offset from the border while dragging a selection. I'm not sure what the best way to handle that is (or for that matter, how slop or hacksaw handle it).

KalaayPT commented 5 months ago

are there any updates on this? been trying to figure out how to make my grim screenshots not have slurps black borders inside them

EDIT: just realized you can just remove the border with -w 0, so grim -g "$(slurp -w 0)" - | wl-copy takes screenshots with no black borders