grim(1)

๐Ÿฆ‹ grim(1) โ€” the screenshot bestie ๐Ÿฆ‹

ok so real talk, this is the manual for grim, and it lives in the General Commands Manual section (section 1, iykyk). she takes pictures of your Wayland screen and she's honestly iconic for it. let's get into it ๐Ÿ’…


โœจ NAME โœจ

grim โ€” grab images from a Wayland compositor ๐Ÿ“ธ


โœจ SYNOPSIS โœจ

grim [options...] [output-file]

โœจ DESCRIPTION โœจ

okay so grim is a command-line utility that takes screenshots of your Wayland desktop. literally her whole thing. ๐Ÿซถ

fr fr though, right now she requires support for the screencopy protocol to work โ€” no screencopy, no screenshot, no exceptions. support for the xdg-output protocol is optional, but it improves fractional scaling support, so likeโ€ฆ enable it if you can? it's giving "optional but slay". โœจ

here's where the image goes: grim writes it to output-file, or if you didn't give one, she makes up a timestamped file name in $GRIM_DEFAULT_DIR. and if $GRIM_DEFAULT_DIR isn't set? she falls back first to $XDG_PICTURES_DIR, and then to the current working directory. the search goes: $GRIM_DEFAULT_DIR โ†’ $XDG_PICTURES_DIR โ†’ cwd. ๐ŸŽ€

oh and if output-file is -, grim writes the image to the standard output instead. very pipe-friendly of her. ๐Ÿ’–


๐ŸŒธ OPTIONS ๐ŸŒธ

  • -h โ€” show the help message and quit. short and sweet, we love a queen who knows when to exit ๐Ÿ’…
  • -s <factor> โ€” sets the output image's scale factor to factor. by default, the scale factor is set to the highest of all outputs. ๐Ÿฆ‹
  • -g "<x>,<y> <width>x<height>" โ€” sets the region to capture, in layout coordinates. very "i only want this part of the screen" of you.
if you set it to -, she reads the region from the standard input instead. cute little stdin moment ๐ŸŽ€
  • -t <type> โ€” sets the output image's file format to type. by default the filetype is png, and the valid values are png, jpeg or ppm. pick your fighter โญ
  • -q <quality> โ€” sets the output jpeg's filetype compression rate to quality. by default the jpeg quality is 80, and valid values are between 0-100. yes these are the real numbers, no cap. ๐Ÿ”ฅ
  • -l <level> โ€” sets the output PNG's filetype compression level to level. by default the PNG compression level is 6 on a scale from 0 to 9. let me break it down for you:
    • level 9 gives the highest compression ratio, but may be slow ๐Ÿ˜ญ
    • level 1 gives a lower compression ratio, but is faster โšก
    • level 0 does no compression at all, and produces very large files โ€” but it can be useful when grim is used in a pipeline with other commands. so like, big file energy, but valid ๐Ÿซถ
  • -o <output> โ€” sets the output name to capture. tell her which monitor, bestie ๐Ÿ‘‘
  • -c โ€” include cursors in the screenshot. yes your little arrow gets to be in the picture too, main character energy ๐Ÿ–ฑ๏ธโœจ
  • -T <identifier> โ€” sets the identifier of a foreign toplevel handle to capture. fancy ๐Ÿ’œ

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

maintained by Simon Ser <contact@emersion.fr>, who is assisted by other open-source contributors. iconic behaviour, honestly. ๐Ÿ’–

for more information about grim development, see <https://gitlab.freedesktop.org/emersion/grim> โ€” go poke around, she's open source fr fr ๐ŸŒˆ


ok that's the whole page bestie, go take some screenshots ๐Ÿ’…โœจ

this little doc is dated 2025-07-08, it's grim(1) again (yes she said her own name twice, she contains multitudes), and it came from the General Commands Manual โ€” mwah, slay, periodt ๐ŸŽ€๐Ÿ’œ

๐Ÿ“ฆ where this page comes from