LinuxCommandLibrary

maim

Send and receive email from the command line

TLDR

Capture a screenshot and save it to the given path

$ maim [path/to/screenshot.png]
copy

Capture a screenshot of the selected region
$ maim [[-s|--select]] [path/to/screenshot.png]
copy

Capture a screenshot of the selected region and save it in the clipboard (requires xclip)
$ maim [[-s|--select]] | xclip [[-se|-selection]] [[c|clipboard]] [[-t|-target]] image/png
copy

Capture a screenshot of the current active window (requires xdotool)
$ maim [[-i|--window]] $(xdotool getactivewindow) [path/to/screenshot.png]
copy

SYNOPSIS

maim [options] [file]

PARAMETERS

-h, --help
    Display help message and exit.

-v, --version
    Display version information and exit.

-s, --select
    Allows the user to select a window or region to capture. Requires slop to be installed.

-i , --window
    Capture a specific window given its ID.

-d , --delay
    Adds a delay (in seconds) before taking the screenshot.

-g , --geometry
    Specifies the geometry (widthxheight+x+y) of the region to capture. Requires slop to be installed.


    The output file name. If not specified, the image is saved as 'screenshot.png'.

DESCRIPTION

Maim is a command-line tool for taking screenshots in Linux. It's designed to be simple and straightforward, offering a basic but functional way to capture your screen's content.

Unlike more complex screenshot tools with extensive features, maim focuses on capturing the entire screen or a specific window and saving it to a file. It relies on imlib2 for image manipulation, making it lightweight and efficient.

The primary benefit of maim is its ease of use within scripts or when a minimal, no-frills screenshot solution is needed. It provides a command-line interface, so users familiar with terminal can easily incorporate screenshots into their workflows. The simple approach also makes it good for documentation, tutorials or quick reporting.

While it lacks advanced selection tools or editing features, its simplicity and dependency on imlib2 makes it a dependable screenshot option.

CAVEATS

Maim depends on imlib2 for image manipulation and, if the `-s` or `-g` options are used, on slop for region selection. If these dependencies are not met, maim will not function correctly. It also lacks advanced features like annotations or direct upload capabilities.

EXAMPLES

  • Capture the entire screen and save it as 'my_screenshot.png': maim my_screenshot.png
  • Capture the entire screen with a 5 second delay: maim -d 5 delayed_screenshot.png
  • Capture a selected region of the screen (requires slop): maim -s selected_area.png
  • HISTORY

    The development history of maim isn't widely documented, but it emerged as a lightweight alternative to more feature-rich screenshot tools. Its focus on simplicity and dependency on imlib2 suggest it was designed to be a fast and efficient option, especially for users who prefer command-line tools. It has been continuously developed to support different selection methods.

    SEE ALSO

    scrot(1), gnome-screenshot(1), import(1) from ImageMagick

    Copied to clipboard