2025-03-14 21:59:59 -06:00
|
|
|
# grim
|
|
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
> Grab images (screenshots) from a Wayland compositor.
|
|
|
|
|
> By default, files are saved to `$GRIM_DEFAULT_DIR` or `$XDG_PICTURES_DIR` if the first variable is unset.
|
|
|
|
|
> If none of the environment variables are set, files are saved to the current working directory.
|
|
|
|
|
> More information: <https://manned.org/grim>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Screenshot all outputs to the default path:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`grim`
|
|
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Screenshot a specific output to the specified file:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
`grim -o {{DP-1}} {{path/to/output.png}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Select a specific region using `slurp` and screenshot it:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
`grim -g "$(slurp)" {{path/to/output.png}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Screenshot and copy the image to the clipboard:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
`grim - | {{clipboard_manager}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Set the output file type (default: `png`):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
`grim -t {{png|ppm|jpeg}} {{path/to/output_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
- Set the PNG compression level (default: 6):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-08-06 22:19:46 -06:00
|
|
|
`grim -l {{0-9}} {{path/to/output.png}}`
|
|
|
|
|
|
|
|
|
|
- Set the JPEG quality level (default: 80):
|
|
|
|
|
|
|
|
|
|
`grim -t jpeg -q {{0-100}} {{path/to/output.jpg}}`
|
|
|
|
|
|
|
|
|
|
- Include cursors in the screenshot:
|
|
|
|
|
|
|
|
|
|
`grim -c`
|