grim(1)
Capture screenshots or record video on Wayland compositors.
Synopsis
grim [OPTION]... [FILE]Description
grim is a lightweight screenshot and screen recording tool for Wayland compositors. It captures the entire screen, a specific monitor, or a selected region, and outputs to a PNG image or video file. Unlike X11-based tools, grim is optimized for modern Wayland desktop environments like Sway and wlroots-based compositors.
By default, grim captures the entire visible screen and writes to stdout or a specified file. When combined with slurp, it can capture user-selected regions interactively.
Common options
| Flag | What it does |
|---|---|
-o OUTPUT | Specify output file (PNG format); omit to write to stdout |
-g GEOMETRY | Capture a specific region using geometry string (WIDTHxHEIGHT+X+Y) |
-t EXTENSION | Set output format (ppm, png); defaults to png |
-s SCALE | Scale output; e.g., -s 0.5 for 50% scale |
-c | Capture cursor in screenshot |
-l QUALITY | Set PNG compression level (0-9); default is 6 |
Examples
Capture entire screen and save to screenshot.png
grim screenshot.pngCapture screen and copy to clipboard (stdout to wl-copy)
grim - | wl-copyScreenshot with timestamp filename in Pictures directory
grim -o ~/Pictures/$(date +%s).pngInteractively select region with slurp and capture it
slurp | grim -g - selection.pngCapture specific region (1920×1080 at position 0,0)
grim -g '1920x1080+0+0' monitor1.pngScreenshot including the mouse cursor
grim -c screenshot_with_cursor.png