-
Notifications
You must be signed in to change notification settings - Fork 78
/
maim.1
133 lines (133 loc) · 6.2 KB
/
maim.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.\" Manpage for maim.
.\" Contact [email protected] to correct errors or typos.
.TH maim 1 2021-02-03 Linux "maim man page"
.SH NAME
maim \- capture screenshot of desktop and make image
.SH SYNOPSIS
maim [OPTIONS] [FILEPATH]
.SH 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.
.SH OPTIONS
.TP
.BR \-h ", " \-\-help
Print help and exit.
.TP
.BR \-v ", " \-\-version
Print version and exit.
.TP
.BR \-x ", " \-\-xdisplay=\fIhostname:number.screen_number\fR
Sets the xdisplay to use.
.TP
.BR \-f ", " \-\-format=\fISTRING\fR
Sets the desired output format, by default maim will attempt to determine 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`.
.TP
.BR \-i ", " \-\-window=\fIWINDOW\fR
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.
.TP
.BR \-g ", " \-\-geometry=\fIGEOMETRY\fR
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.
.TP
.BR \-w ", " \-\-parent=\fIWINDOW\fR
By default, maim assumes the --geometry values are in respect to the provided --window (or root if not provided). This parameter overrides 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.
.TP
.BR \-B ", " \-\-capturebackground
By default, when capturing a window, maim will ignore anything beneath the specified window. This parameter overrides this and also captures elements underneath the window.
.TP
.BR \-d ", " \-\-delay=\fIFLOAT\fR
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 \-\-quiet for muting this message.
.TP
.BR \-u ", " \-\-hidecursor
By default maim super-imposes the cursor onto the image, you can disable that behavior with this flag.
.TP
.BR \-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 quality 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 produce smaller files. No effect on bmp images.
.TP
.BR \-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.
.SH SLOP OPTIONS
.TP
.BR \-b ", " \-\-bordersize=\fIFLOAT\fR
Sets the selection rectangle's thickness.
.TP
.BR \-p ", " \-\-padding=\fIFLOAT\fR
Sets the padding size for the selection, this can be negative.
.TP
.BR \-t ", " \-\-tolerance=\fIFLOAT\fR
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.
.TP
.BR \-c ", " \-\-color=\fIFLOAT,FLOAT,FLOAT,FLOAT\fR
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.
.TP
.BR \-r ", " \-\-shader=\fISTRING\fR
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. See https://github.com/naelstrof/slop for more information on how to create your own shaders.
.TP
.BR \-n ", " \-\-nodecorations=\fIINT\fR
Sets the level of aggressiveness when trying to remove window decorations. `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'.
.TP
.BR \-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.
.TP
.BR \-D ", " \-\-nodrag
Allows you to click twice to indicate a selection, rather than click-dragging.
.TP
.BR \-q ", " \-\-quiet
Disable any unnecessary cerr output. Any warnings or info simply won't print.
.TP
.BR \-k ", " \-\-nokeyboard
Disables the ability to cancel selections with the keyboard.
.TP
.BR \-o ", " \-\-noopengl
Disables graphics hardware acceleration.
.SH EXAMPLES
Screenshot the active window and save it to the clipboard for quick pasting.
.PP
.nf
.RS
maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
.RE
.fi
.PP
Save a desktop screenshot with a unique ordered timestamp in the Pictures folder.
.PP
.nf
.RS
maim ~/Pictures/$(date +%s).png
.RE
.fi
.PP
Save screenshot to the Pictures folder and add it to the clipboard at the same time.
.PP
.nf
.RS
maim | tee ~/Pictures/$(date +%s).png | xclip -selection clipboard -t image/png
.RE
.fi
.PP
Prompt for a region to screenshot. Add a fancy shadow to it, then save it to shadow.png.
.PP
.nf
.RS
maim -s | convert - \\( +clone -background black -shadow 80x3+5+5 \\) +swap -background none -layers merge +repage shadow.png
.RE
.fi
.PP
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.
.PP
.nf
.RS
bindsym $mod+Shift+x exec "\
echo 1 > /sys/class/leds/platform\:\:micmute/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/platform\:\:micmute/brightness; \
i3-nagbar --message 'Screenshot created' --type warning & \
sleep 3; pkill i3-nagbar"
.RE
.fi
.PP
.SH SEE ALSO
.BR slop(1)
.SH BUGS
No known bugs.
.SH AUTHOR
Dalton Nell ([email protected])