Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
maim(1) 			  maim man page 			 maim(1)

NAME
     maim - capture screenshot of desktop and make image

SYNOPSIS
     maim [OPTIONS] [FILEPATH]

DESCRIPTION
     maim  (make  image)  is an utility that takes a screenshot of your desktop,
     and encodes a png, jpg, bmp or webp image of it. By default it outputs  the
     encoded image data directly to standard output.

OPTIONS
     -h, --help
	    Print help and exit.

     -v, --version
	    Print version and exit.

     -x, --xdisplay=hostname:number.screen_number
	    Sets the xdisplay to use.

     -f, --format=STRING
	    Sets  the desired output format, by default maim will attempt to de-
	    termine the desired output	format	automatically  from  the  output
	    file.  If that fails it defaults to a lossless png format. Currently
	    only supports `png`, `jpg`, `bmp`, and `webp`.

     -i, --window=WINDOW
	    By default, maim captures the root window. This parameter  overrides
	    this  and sets the desired window to capture. Allows for an integer,
	    hex, or `root` for input.

     -g, --geometry=GEOMETRY
	    Sets the region to capture, uses local coordinates	from  the  given
	    window.  So -g 10x30-5+0 would represent the rectangle wxh+x+y where
	    w=10, h=30, x=-5, and y=0. x and y are the upper  left  location  of
	    this rectangle.

     -w, --parent=WINDOW
	    By default, maim assumes the --geometry values are in respect to the
	    provided  --window	(or  root if not provided). This parameter over-
	    rides this behavior by making the geometry be in respect to whatever
	    window you provide to --parent.  Allows  for  an  integer,	hex,  or
	    `root` for input.

     -B, --capturebackground
	    By	default,  when capturing a window, maim will ignore anything be-
	    neath the specified window. This parameter overrides this  and  also
	    captures elements underneath the window.

     -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  screen-
	    shot is taken. See --quiet for muting this message.

     -u, --hidecursor
	    By	default  maim  super-imposes  the cursor onto the image, you can
	    disable that behavior with this flag.

     -m, --quality
	    An integer from 1 to 10 that determines the compression quality. For
	    lossy formats (jpg and webp), lower settings  will	produce  smaller
	    files  with lower quality, while higher settings will increase qual-
	    ity at the cost of higher file size. A quality of 10 is lossless for
	    webp. For png, lower  settings  will  compress  faster  and  produce
	    larger  files,  while higher settings will compress slower, but pro-
	    duce smaller files. No effect on bmp images.

     -s, --select
	    Enables an interactive selection mode where you may select	the  de-
	    sired  region  or  window  before a screenshot is captured. Uses the
	    settings below to determine the visuals and settings of slop.

SLOP OPTIONS
     -b, --bordersize=FLOAT
	    Sets the selection rectangle's thickness.

     -p, --padding=FLOAT
	    Sets the padding size for the selection, this can be negative.

     -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
	    to	0  will  disable  window selections. Alternatively setting it to
	    9999999 would force a window selection.

     -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.

     -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 ~/.con-
	    fig/maim. See https://github.com/naelstrof/slop for more information
	    on how to create your own shaders.

     -n, --nodecorations=INT
	    Sets the level of aggressiveness when trying to remove window  deco-
	    rations. `0' is off, `1' will try lightly to remove decorations, and
	    `2'  will  recursively  descend into the root tree until it gets the
	    deepest available visible child under the mouse. Defaults to `0'.

     -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
	    than 1.

     -D, --nodrag
	    Allows you to click twice  to  indicate  a	selection,  rather  than
	    click-dragging.

     -q, --quiet
	    Disable  any  unnecessary  cerr  output. Any warnings or info simply
	    won't print.

     -k, --nokeyboard
	    Disables the ability to cancel selections with the keyboard.

     -o, --noopengl
	    Disables graphics hardware acceleration.

EXAMPLES
     Screenshot the active window and save it to the clipboard for  quick  past-
     ing.

	    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 ~/screen-
     shots/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)

BUGS
     No known bugs.

AUTHOR
     Dalton Nell (naelstrof@gmail.com)

Linux				   2021-02-03				 maim(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=maim&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help