-
Notifications
You must be signed in to change notification settings - Fork 58
/
slop.1
80 lines (80 loc) · 3.38 KB
/
slop.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
.\" Manpage for slop.
.\" Contact [email protected] to correct errors or typos.
.TH SLOP 1 2021-02-03 Linux "slop man page"
.SH NAME
slop \- select operation, either mark screen region or pick window
.SH SYNOPSIS
slop [-klqn] [OPTIONS]
.SH DESCRIPTION
slop is an application that queries for a selection from the user and prints the region to stdout. It grabs the mouse and turns it into a crosshair, lets the user click and drag to make a selection (or click on a window) while drawing a pretty box around it, then finally prints the selection's dimensions to stdout.
.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 \-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/slop. See https://github.com/naelstrof/slop for more information on how to create your own shaders.
.TP
.BR \-f ", " \-\-format=\fISTRING\fR
Sets the output format for slop. Format specifiers are %x (x offset), %y (y offset), %w (width), %h (height), %i (window id), %c (1 if cancelled, 0 otherwise), %g (geometry - `%wx%h+%x+%y'), and %% for a literal percent sign.
.TP
.BR \-n ", " \-\-nodecorations=INT
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'. Supplying slop with just `-n` is equivalent to supplying `-n1`.
.TP
.BR \-l ", " \-\-highlight
Instead of outlining a selection, slop 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 simply won't print.
.TP
.BR \-k ", " \-\-nokeyboard
Disables the ability to cancel selections with the keyboard.
.TP
.BR \-o ", " \-\-noopengl
Disables graphics acceleration. Might be useful if you get rendering bugs.
.SH EXAMPLES
To emulate a windows XP selection, you can use something like this:
.PP
.nf
.RS
slop --highlight --tolerance=0 --color=0.3,0.4,0.6,0.4
.RE
.fi
.PP
In order to avoid using
.BR eval(1)
in your scripts (pretty big security issue), you can use slop like this instead:
.PP
.nf
.RS
read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
.RE
.fi
.PP
.SH SEE ALSO
.BR maim(1)
.SH BUGS
No known bugs.
.SH AUTHOR
Dalton Nell ([email protected])