maim(1)
π maim β the manual page, but make it cute π
okay bestie, sit down, hydrate, and let me tell you about maim (that's maim(1) if we're being formal, which we're not) π«Ά
β¨ NAME β¨
maim β capture screenshot of desktop and make image πΈ
β¨ SYNOPSIS β¨
maim [OPTIONS] [FILEPATH]
β¨ DESCRIPTION β¨
so maim literally stands for make image (yes, it's that girl π
) and what she does is take a screenshot of your desktop and encode it into a png, jpg, bmp or webp image. that's the whole vibe.
and here's the iconic part: by default she just dumps the encoded image data straight to standard output. no file, no fuss, just data. slay.
β¨ OPTIONS β¨
-h,--helpβ prints the help and then dips out. bye π-v,--versionβ prints the version and exits. iconic, brief, perfect.-x,--xdisplay=hostname:number.screen_numberβ sets the xdisplay to use. tell her which display, she'll go there. π-f,--format=STRINGβ sets the desired output format. by default maim will try to figure out the format all by herself from the output file π§ β¨. and if that fails? she defaults to a losslesspngformat. currently only supportspng,jpg,bmp, andwebpβ those four, no more, no less, don't push her.-i,--window=WINDOWβ by default maim captures the root window. this parameter overrides that and sets the desired window to capture. allows for an integer, hex, orrootfor input. she's flexible like that πββοΈ-g,--geometry=GEOMETRYβ sets the region to capture, using local coordinates from the given window. so-g 10x30-5+0would represent the rectanglewxh+x+ywherew=10,h=30,x=-5, andy=0.xandyare the upper left location of this rectangle. math but make it fashion π-w,--parent=WINDOWβ by default maim assumes the--geometryvalues are in respect to the provided--window(or root if not provided). this parameter overrides that behavior by making the geometry be in respect to whatever window you provide to--parent. allows for an integer, hex, orrootfor input. it's giving "everything is relative" π¦-B,--capturebackgroundβ by default, when capturing a window, maim will ignore anything beneath the specified window. this parameter overrides that and also captures elements underneath the window. peek behind the curtain energy.-d,--delay=FLOATβ sets the time in seconds to wait before taking a screenshot. prints a simple message to show how many seconds are left before a screenshot is taken β³. see--quietfor muting this message.-u,--hidecursorβ by default maim super-imposes the cursor onto the image, and you can disable that behavior with this flag. bye bye cursor arrow ππ±οΈ-m,--qualityβ an integer from1to10that determines the compression quality. for lossy formats (jpgandwebp), lower settings will produce smaller files with lower quality, while higher settings will increase quality at the cost of higher file size. a quality of10is lossless forwebp. forpng, lower settings will compress faster and produce larger files, while higher settings will compress slower, but produce smaller files. no effect onbmpimages. bmp said "not today" π-s,--selectβ enables an interactive selection mode where you may select the desired region or window before a screenshot is captured π―. uses the settings below to determine the visuals and settings of slop.
π SLOP OPTIONS π
(yes these are literally slop's options, maim is borrowing, we love a crossover episode π€)
-b,--bordersize=FLOATβ sets the selection rectangle's thickness. thick or thin, her choice π-p,--padding=FLOATβ sets the padding size for the selection, and this can be negative. negative padding, she contains multitudes π-t,--tolerance=FLOATβ how far in pixels the mouse can move after clicking, and still be detected as a normal click instead of a click-and-drag. setting this to0will disable window selections. alternatively setting it to9999999would force a window selection. go big or go home fr fr π₯-c,--color=FLOAT,FLOAT,FLOAT,FLOATβ sets the selection rectangle's color. supports RGB or RGBA input. depending on the system's window manager/OpenGL support, the opacity may be ignored. rip transparency, sometimes.-r,--shader=STRINGβ this sets the vertex shader, and fragment shader combo to use when drawing the final framebuffer to the screen. this obviously only works when OpenGL is enabled. the shaders are loaded from~/.config/maim. seehttps://github.com/naelstrof/slopfor more information on how to create your own shaders. custom shaders?? main character energy β¨-n,--nodecorations=INTβ sets the level of aggressiveness when trying to remove window decorations.0is off,1will try lightly to remove decorations, and2will recursively descend into the root tree until it gets the deepest available visible child under the mouse. defaults to0. level 2 is unhinged in the best way π²-l,--highlightβ instead of outlining a selection, maim will highlight it instead. this is particularly useful if the color is set to an opacity lower than1. glow up β¨-D,--nodragβ allows you to click twice to indicate a selection, rather than click-dragging. two taps, no dragging, we love efficiency π«Ά-q,--quietβ disable any unnecessary cerr output. any warnings or info simply won't print. shhh π€«-k,--nokeyboardβ disables the ability to cancel selections with the keyboard. no escape, literally. π-o,--noopenglβ disables graphics hardware acceleration. sometimes you just wanna go slow and steady π’
πΈ EXAMPLES πΈ
screenshot the active window and save it to the clipboard for quick pasting.
maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
save a desktop screenshot with a unique ordered timestamp in the Pictures folder.
maim ~/Pictures/$(date +%s).png
save screenshot to the Pictures folder and add it to the clipboard at the same time.
maim | tee ~/Pictures/$(date +%s).png | xclip -selection clipboard -t image/png
prompt for a region to screenshot. add a fancy shadow to it, then save it to shadow.png.
maim -s | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png
in scripts, here in i3 window manager: enable light on the Thinkpad T430 laptop, wait 5 seconds, screenshot all displays, save file like ~/screenshots/2022-dec-21--12-56-08_maim.png, disable light, show i3 notification for 3 seconds.
bindsym $mod+Shift+x exec " echo 1 > /sys/class/leds/platformmicmute/brightness; sleep 5; maim --hidecursor ~/screenshots/$(date +%Y-%b-%d--%H-%M-%S_maim | tr A-Z a-z).png; echo 0 > /sys/class/leds/platformmicmute/brightness; i3-nagbar --message 'Screenshot created' --type warning & sleep 3; pkill i3-nagbar"
π SEE ALSO π
slop(1) β go say hi to her sister, she's the selection queen π
π BUGS π
no known bugs. she's perfect, your honor β¨π
π«Ά AUTHOR π«Ά
Dalton Nell (naelstrof@gmail.com) β thank you for the screenshots king π
ok that's the whole page bestie, go take some screenshots and be iconic about it πΈπ
and that's a wrap β this page lives on Linux, it's the version from 2021-02-03, and yes it's still maim(1) in spirit π bye pookie π
π¦ where this page comes from
- alpine 3.24: maim-doc 5.8.1-r2 Β· GPL-3.0-or-later
- arch rolling: maim 5.8.2-1 Β· GPL3
- debian trixie: maim 5.8.0-1 Β· GPL-3.0-or-later
- epel 9: maim 5.8.0-1.el9 Β· GPLv3
- fedora 43: maim 5.8.1-3.fc43 Β· GPL-3.0-only
- fedora 44: maim 5.8.1-4.fc44 Β· GPL-3.0-only
- nixos 26.05: maim 5.8.1
- nixpkgs unstable: maim 5.8.2
- opensuse-leap 16.0: maim 5.8.0-bp160.1.3 Β· GPL-3.0-or-later
- opensuse-leap 16.0: maim 5.8.0-bp160.1.3 Β· GPL-3.0-or-later
- opensuse-leap 16.0: maim 5.8.0-bp160.1.3 Β· GPL-3.0-or-later
- opensuse-leap 16.0: maim 5.8.0-bp160.1.3 Β· GPL-3.0-or-later
- ubuntu questing: maim 5.8.0-1
- ubuntu resolute: maim 5.8.0-1.1build1 Β· GPL-3.0-or-later
- ubuntu stonking: maim 5.8.0-1.1build2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms