LinuxCommandLibrary

slop

Interactive screen region selection for X11

TLDR

Get a screen selection and output geometry
$ slop
copy
Double click instead of click-and-drag
$ slop -D
copy
Highlight selection instead of outline
$ slop -l
copy
Specify output format
$ slop -f "%g"
copy
Set selection color
$ slop -c [red],[green],[blue],[alpha]
copy
Set border size
$ slop -b [thickness]
copy

SYNOPSIS

slop [-klqnD] [OPTIONS]

DESCRIPTION

slop (Select Operation) queries the user for a screen region selection and outputs the geometry to stdout. Users can click and drag to create a selection rectangle, or select an existing window. The output format is configurable for integration with other tools.
Common use cases include screenshot region selection, window geometry capture, and integration with screen recording tools. The output can be parsed by scripts to perform operations on the selected area.

PARAMETERS

-f, --format string

Output format using specifiers: %x, %y, %w, %h, %i (window ID), %c (cancel), %g (geometry)
-b, --bordersize float
Selection rectangle border thickness
-p, --padding float
Padding around selection (negative values shrink)
-c, --color r,g,b,a
Selection box color as RGBA floats (0.0-1.0)
-t, --tolerance float
Pixel threshold to distinguish click from drag
-D, --nodrag
Use two-click mode instead of click-and-drag
-l, --highlight
Fill selection area instead of drawing outline
-n, --nodecorations int
Window decoration removal aggressiveness (0-2)
-k, --nokeyboard
Disable keyboard cancellation
-q, --quiet
Suppress warning messages
-r, --shader string
Custom shader from ~/.config/slop
-o, --noopengl
Disable OpenGL acceleration
-x, --xdisplay display
Specify X display to use
-v, --version
Display version
-h, --help
Display help

CAVEATS

Requires X11; does not work on Wayland without XWayland. OpenGL acceleration requires appropriate drivers. Custom shaders must be placed in ~/.config/slop directory. Selection may include window decorations unless -n flag is used.

HISTORY

slop was created by naelstrof as a successor to the selection functionality in scrot. The tool is designed to be modular and integrate with other utilities via shell pipelines. It is commonly used alongside maim for screenshots and various screen recording tools.

SEE ALSO

maim(1), scrot(1), xdotool(1), xwininfo(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard