• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

modules/H15-Jun-2021-256209

src/H15-Jun-2021-2,9702,408

.gitignoreH A D15-Jun-2021208 129

COPYINGH A D15-Jun-202134.3 KiB675553

README.mdH A D15-Jun-20214.5 KiB8972

maim.1H A D15-Jun-20215.6 KiB120117

README.md

1# maim
2maim (Make Image) is a utility that takes screenshots of your desktop. It's meant to overcome shortcomings of scrot and performs better in several ways.
3
4## Features
5* Takes screenshots of your desktop, and saves it in png, jpg, or bmp format.
6* Takes screenshots predetermined regions or windows, useful for automation.
7* Allows a users to select a region, or window, before taking a screenshot on the fly.
8
9![screenshot with selection](http://i.imgur.com/ILZKJCT.png)
10* Blends the system cursor to the screenshot.
11![screenshot with cursor](http://i.imgur.com/PD1bgBg.png)
12* Masks off-screen pixels to be transparent or black.
13
14![screenshot with masked pixels](http://i.imgur.com/kMkcHlZ.png)
15* Maim cleanly pipes screenshots directly to standard output (unless otherwise specified). Allowing for command chaining.
16* Maim supports anything slop does, even selection [shaders](https://github.com/naelstrof/slop#shaders)!
17
18![slop animation](http://i.giphy.com/kfBLafeJfLs2Y.gif)
19
20
21## Installation
22
23### Install using your Package Manager (Preferred)
24* [Arch Linux: community/maim](https://www.archlinux.org/packages/community/x86_64/maim/)
25* [Debian: maim](https://tracker.debian.org/pkg/maim)
26* [Ubuntu: maim](https://packages.ubuntu.com/search?keywords=maim)
27* [Void Linux: maim](https://github.com/void-linux/void-packages/tree/master/srcpkgs/maim/template)
28* [FreeBSD: graphics/maim](http://www.freshports.org/graphics/maim/)
29* [NetBSD: x11/maim](http://pkgsrc.se/x11/maim)
30* [OpenBSD: graphics/maim](http://openports.se/graphics/maim)
31* [CRUX: maim](https://crux.nu/portdb/?a=search&q=maim)
32* [Gentoo: media-gfx/maim](https://packages.gentoo.org/packages/media-gfx/maim)
33* [NixOS: maim](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/graphics/maim/default.nix)
34* [GNU Guix: maim](https://guix.gnu.org/en/packages/maim-5.6.3/)
35* [Ravenports: maim](http://www.ravenports.com/catalog/bucket_B4/maim/standard/)
36* [Fedora: maim](https://src.fedoraproject.org/rpms/maim)
37* Please make a package for maim on your favorite system, and make a pull request to add it to this list.
38
39### Install using CMake (Requires CMake, git, libXrender, libXfixes, libGLM, libxcomposite, libxrandr)
40```bash
41git clone https://github.com/naelstrof/slop.git
42cd slop
43cmake -DCMAKE_INSTALL_PREFIX="/usr" ./
44make && sudo make install
45cd ..
46git clone https://github.com/naelstrof/maim.git
47cd maim
48cmake -DCMAKE_INSTALL_PREFIX="/usr" ./
49make && sudo make install
50```
51
52## Examples
53Maim allows for a lot of unique and interesting functionalities. Here's an example of a few interactions.
54
55* This command will allow you to select an area on your screen, then copy the selection to your clipboard. This can be used to easily post images in mumble, discord, gimp-- or any other image supporting application.
56```bash
57$ maim -s | xclip -selection clipboard -t image/png
58```
59
60* This messy command forces a user to select a window to screenshot, then applies a shadow effect using *imagemagick*, then saves it to shadow.png. It looks really nice on windows that support an alpha channel.
61```bash
62$ maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png
63```
64
65* This command is a particular favorite of mine, invented by a friend. It simply prints the RGB values of the selected pixel. A basic color picker that has the additional ability to average out the pixel values of an area. If used cleverly with the geometry and window flag, the return color might warn you of a found counter-strike match...
66```bash
67$ maim -st 0 | convert - -resize 1x1\! -format '%[pixel:p{0,0}]' info:-
68```
69
70* This is a basic, but useful command that simply screenshots the current active window.
71```bash
72$ maim -i $(xdotool getactivewindow) ~/mypicture.jpg
73```
74
75* This is another basic command, but I find it necessary to describe the usefulness of date. This particular command creates a full screenshot, and names it as the number of seconds that passed since 1970. Guaranteed unique, already sorted, and easily read.
76```bash
77$ maim ~/Pictures/$(date +%s).png
78```
79
80* This one overlays a still of your desktop, then allows you to crop it. Doesn't play well with multiple monitors, but I'm sure if it did it wouldn't look this pretty and simple.
81```bash
82$ maim | feh - -x & maim -s cropped.png
83```
84
85* Finally with the [help your friendly neighborhood scripter](https://github.com/tremby/imgur.sh), pictures can automatically be uploaded and their URLs copied to the clipboard with this basic command.
86```bash
87$ maim -s /tmp/screenshot.png; imgur.sh /tmp/screenshot.png | xclip -selection clipboard
88```
89