slop.1 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .\" Manpage for slop.
  2. .\" Contact naelstrof@gmail.com to correct errors or typos.
  3. .TH SLOP 1 2017-03-21 Linux "slop man page"
  4. .SH NAME
  5. slop \- select operation
  6. .SH SYNOPSIS
  7. slop [-klqn] [OPTIONS]
  8. .SH DESCRIPTION
  9. 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.
  10. .SH OPTIONS
  11. .TP
  12. .BR \-h ", " \-\-help
  13. Print help and exit.
  14. .TP
  15. .BR \-v ", " \-\-version
  16. Print version and exit.
  17. .TP
  18. .BR \-x ", " \-\-xdisplay=\fIhostname:number.screen_number\fR
  19. Sets the xdisplay to use.
  20. .TP
  21. .BR \-b ", " \-\-bordersize=\fIFLOAT\fR
  22. Sets the selection rectangle's thickness.
  23. .TP
  24. .BR \-p ", " \-\-padding=\fIFLOAT\fR
  25. Sets the padding size for the selection, this can be negative.
  26. .TP
  27. .BR \-t ", " \-\-tolerance=\fIFLOAT\fR
  28. 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.
  29. .TP
  30. .BR \-c ", " \-\-color=\fIFLOAT,FLOAT,FLOAT,FLOAT\fR
  31. 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.
  32. .TP
  33. .BR \-r ", " \-\-shader=\fISTRING\fR
  34. 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.
  35. .TP
  36. .BR \-f ", " \-\-format=\fISTRING\fR
  37. 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.
  38. .TP
  39. .BR \-n ", " \-\-nodecorations=INT
  40. 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`.
  41. .TP
  42. .BR \-l ", " \-\-highlight
  43. 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.
  44. .TP
  45. .BR \-q ", " \-\-quiet
  46. Disable any unnecessary cerr output. Any warnings simply won't print.
  47. .TP
  48. .BR \-k ", " \-\-nokeyboard
  49. Disables the ability to cancel selections with the keyboard.
  50. .TP
  51. .BR \-o ", " \-\-noopengl
  52. Disables graphics acceleration. Might be useful if you get rendering bugs.
  53. .SH EXAMPLES
  54. To emulate a windows XP selection, you can use something like this:
  55. .PP
  56. .nf
  57. .RS
  58. slop --highlight --tolerance=0 --color=0.3,0.4,0.6,0.4
  59. .RE
  60. .fi
  61. .PP
  62. In order to avoid using
  63. .BR eval(1)
  64. in your scripts (pretty big security issue), you can use slop like this instead:
  65. .PP
  66. .nf
  67. .RS
  68. read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
  69. .RE
  70. .fi
  71. .PP
  72. .SH SEE ALSO
  73. .BR maim(1)
  74. .SH BUGS
  75. No known bugs.
  76. .SH AUTHOR
  77. Dalton Nell (naelstrof@gmail.com)