LinuxCommandLibrary

grim

Wayland-native screenshot tool

TLDR

Screenshot all outputs

$ grim
copy
Screenshot a specific output
$ grim -o [output_name]
copy
Screenshot a specific region
$ grim -g "[x],[y] [width]x[height]"
copy
Select a region and screenshot it (using slurp)
$ grim -g "$(slurp)"
copy
Use a custom filename
$ grim "[path/to/file.png]"
copy
Screenshot and copy to clipboard
$ grim - | wl-copy
copy

SYNOPSIS

grim [options] [output]

DESCRIPTION

grim (grab image) is a Wayland-native screenshot tool. It captures images directly from the Wayland compositor, making it compatible with Sway, GNOME on Wayland, and other Wayland-based environments.
For region selection, grim is commonly paired with slurp, which allows interactive selection of screen areas. Output to stdout (-) enables piping to clipboard managers like wl-copy.

PARAMETERS

-g GEOMETRY

Capture specific region (x,y widthxheight format)
-o OUTPUT
Capture specific Wayland output (monitor)
-s FACTOR
Set scale factor
-t TYPE
Output format: png, jpeg, or ppm
-q QUALITY
JPEG quality (1-100)
-l LEVEL
PNG compression level (0-9)
-c
Include cursor in screenshot

CAVEATS

Wayland-only; does not work on X11 (use scrot or maim instead). Requires a compatible Wayland compositor with screencopy protocol support. Some compositors may need additional configuration to enable screenshots.

HISTORY

grim was created by Simon Ser (emersion) as part of the Wayland ecosystem tooling for the Sway window manager. It provides functionality similar to X11 tools like scrot but designed specifically for Wayland's security model.

SEE ALSO

slurp(1), wl-copy(1), scrot(1), maim(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community