Select a region in a Wayland compositor and print it to the standard output. Works well with grim.
Join the IRC channel: #emersion on Libera Chat.
Install dependencies:
- meson
- wayland
- cairo
- libxkbcommon
- scdoc (optional: man pages)
Then run:
git clone https://github.com/emersion/slurp
cd slurp
meson setup build
ninja -C build
build/slurpSelect a region and print it to stdout:
slurpSelect a single point instead of a region:
slurp -pSelect an output and print its name:
slurp -o -f "%o"Select a window under Sway, using swaymsg and jq:
swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurpSelect a window without border under Sway, using swaymsg and jq:
swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x+.window_rect.x),\(.rect.y+.window_rect.y) \(.window_rect.width)x\(.window_rect.height)"' | slurpEither send GitHub pull requests or send patches on the mailing list.
MIT