LinuxCommandLibrary

slurp

Wayland region selection tool

TLDR

Select a region and print it to stdout

$ slurp
copy
Select a region while displaying dimensions
$ slurp -d
copy
Select a single point instead of a region
$ slurp -p
copy
Select an output and print its name
$ slurp -o -f '%o'
copy
Select a region and take a borderless screenshot with grim
$ grim -g "$(slurp -w 0)"
copy
Select a region and record video with wf-recorder
$ wf-recorder -g "$(slurp -w 0)"
copy

SYNOPSIS

slurp [options]

DESCRIPTION

slurp allows users to select a region on a Wayland compositor interactively. It outputs the selected region coordinates in a format that can be used by other tools like grim for screenshots or wf-recorder for screen recording.
The tool renders a translucent overlay and lets users click and drag to select a rectangular region. It's designed to be combined with other Wayland-native tools through shell command substitution.

PARAMETERS

-d

Display dimensions of selection
-p
Select a single point instead of region
-o
Select an entire output (display)
-r
Require selection to be inside a single output
-b color
Set selection box background color
-c color
Set selection box border color
-s color
Set selection color
-w width
Set selection border width (0 for no border)
-f format
Output format string (%x, %y, %w, %h, %o)
-a ratio
Force aspect ratio (e.g., 16:9)

CAVEATS

Wayland only; requires a compositor that supports the layer-shell protocol. Does not capture images itself; use with grim for screenshots. Color values use #RRGGBBAA format.

HISTORY

Written by Simon Ser (emersion) as part of the sway/wlroots ecosystem for Wayland. Provides the region selection functionality that scrot -s provides on X11, adapted for Wayland's security model.

SEE ALSO

grim(1), wf-recorder(1), scrot(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community