slurp(1)

โœจ slurp(1) โ€” the region-selector bestie โœจ

okay so like. hi. you're looking at the manual for slurp, and honestly? she's iconic. she's a command-line utility, she lives in the General Commands Manual, and she's here to help you pick a little rectangle off your screen. let's get into it ๐Ÿ’…


๐ŸŒธ NAME ๐ŸŒธ

slurp โ€” select a region in a Wayland compositor


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

slurp [options...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

slurp is a command-line utility that lets you select a region from Wayland compositors which support the layer-shell protocol. literally her whole thing. you just hold the pointer to select, or click to cancel the selection. that's it, that's the vibe. no cap ๐Ÿ’–

now, here's where it gets interesting. if the standard input is not a TTY, or if you used the -r option, then slurp switches modes and reads a list of predefined rectangles so you can do quick selection instead of freehand dragging. each line has to be in this exact shape:

<x>,<y> <width>x<height> [label]

the label? optional, bestie. it can be any string that doesn't contain newlines. and you can grab it later using the %l sequence inside a format string. so cute, so useful ๐Ÿซถ

two more keyboard things to know about while you're selecting:

  • hit the Esc key โ†’ selection is cancelled ๐Ÿ˜ญ
  • hold the Space key โ†’ the selection moves instead of being resized โœจ

๐Ÿ’– OPTIONS ๐Ÿ’–

  • -h โ€” show the help message and quit. short, sweet, informative.
  • -d โ€” display the dimensions of the selection. now you know how big your rectangle is ๐Ÿ‘‘
  • -b color โ€” set the background color. peek at COLORS below for the deets.
  • -c color โ€” set the border color. again, COLORS has you.
  • -s color โ€” set the selection color. yes. also COLORS.
  • -B color โ€” set the color used for highlighting predefined rectangles from standard input when they are not selected. (this one doesn't send you to COLORS, so, y'know, do with that what you will ๐ŸŒธ)
  • -F font family โ€” set the font family name used when displaying the dimensions box. only useful when you pair it with -d, fyi. the font family names guaranteed to work are the standard generic CSS2 options: serif, sans-serif, monospace, cursive and fantasy. it defaults to the sans-serif family name. periodt.
  • -w weight โ€” set the border weight.
  • -f format โ€” set the format. the FORMAT section is right down there, go look ๐Ÿ’œ
  • -p โ€” select a single pixel instead of a rectangle. โš ๏ธ heads up: this mode ignores any predefined rectangles read from the standard input.
  • -o โ€” add predefined rectangles for all outputs, as if they'd been provided on standard input. and the label for each one? it'll be the name of the output. love that for us ๐ŸŒˆ
  • -r โ€” require the user to select one of the predefined rectangles. those can come from standard input, or โ€” if -o is used โ€” the rectangles of all display outputs. ๐Ÿšจ this option conflicts with -p. pick a lane bestie ๐Ÿ˜ญ
  • -a width:height โ€” force selections to have the given aspect ratio. note that this constraint is not applied to the predefined rectangles specified using -o. so those little guys are free to be whatever shape they want ๐Ÿฆ‹

๐ŸŒˆ COLORS ๐ŸŒˆ

colors can be given in either #RRGGBB or #RRGGBBAA format. the # is optional โ€” she's flexible like that ๐Ÿ’…


โญ FORMAT โญ

here's every interpreted sequence, laid out for you:

  • %x โ€” the x-coordinate of the selection
  • %y โ€” the y-coordinate of the selection
  • %w โ€” the width of the selection
  • %h โ€” the height of the selection
  • %X โ€” the x-coordinate of the selection, with coordinates relative to the output containing the top left corner
  • %Y โ€” the y-coordinate of the selection, with coordinates relative to the output containing the top left corner
  • %W โ€” the width of the selection cropped to the output containing the top left corner
  • %H โ€” the height of the selection cropped to the output containing the top left corner
  • %l โ€” the label included with the region from stdin
  • %o โ€” the name of the output containing the top left corner, or "<unknown>" if it's not known ๐Ÿ™ˆ

and the default format? it's this, exactly:

"%x,%y %wx%h\n"

๐ŸŽ€ KEYBOARD CONTROLS ๐ŸŽ€

these are the keyboard actions you can use while you're mid-selection, bestie:

  • Escape โ€” cancel the selection and exit slurp
  • Space โ€” if you're currently making a selection, then while space is held down, move the entire selection rather than change the selection's size as you move the pointer
  • Shift โ€” experimental. if the -a option wasn't specified, then set the aspect ratio to 1:1 while shift is held down, and releasing it restores the un-constrained aspect ratio. ๐Ÿ“Œ note: this behavior may change in the future depending on feedback

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

maintained by Simon Ser <contact@emersion.fr>, who is assisted by other open-source contributors. for more info about slurp development, see https://github.com/emersion/slurp. the whole community ate with this one, fr fr ๐Ÿซถ


and that's the whole page, babes ๐Ÿ’– this was slurp(1) from the General Commands Manual, dated 2026-03-22. go select a region. you got this. slay โœจ๐ŸŒธ๐ŸŽ€

๐Ÿ“ฆ where this page comes from