12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package "slop"
  2. version "v@slop_VERSION_MAJOR@.@slop_VERSION_MINOR@.@slop_VERSION_PATCH@"
  3. usage "slop [options]"
  4. description "slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout."
  5. versiontext "Copyright (C) 2014 Dalton Nell, Slop Contributors (https://github.com/naelstrof/slop/graphs/contributors)"
  6. text "Options"
  7. option "xdisplay" - "Sets the x display."
  8. string
  9. typestr="hostname:number.screen_number"
  10. optional
  11. option "nokeyboard" - "Disables the ability to cancel selections with the keyboard."
  12. flag
  13. off
  14. option "bordersize" b "Set the selection rectangle's thickness. Does nothing when --highlight is enabled."
  15. int
  16. default="5"
  17. optional
  18. option "padding" p "Set the padding size of the selection. Can be negative."
  19. int
  20. default="0"
  21. optional
  22. option "tolerance" t "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."
  23. int
  24. default="2"
  25. optional
  26. option "gracetime" g "Set the amount of time before slop will check for keyboard cancellations in seconds."
  27. string
  28. typestr="FLOAT"
  29. default="0.4"
  30. optional
  31. option "color" c "Set the selection rectangle's color. Supports RGB or RGBA values."
  32. string
  33. typestr="FLOAT,FLOAT,FLOAT,FLOAT"
  34. default="0.5,0.5,0.5,1"
  35. optional
  36. option "nodecorations" n "Attempt to select child windows in order to avoid window decorations."
  37. flag
  38. off
  39. option "min" - "Set the minimum output of width or height values. This is useful to avoid outputting 0. Setting min and max to the same value disables drag selections."
  40. int
  41. default="0"
  42. optional
  43. option "max" - "Set the maximum output of width or height values. Setting min and max to the same value disables drag selections."
  44. int
  45. default="0"
  46. optional
  47. option "highlight" l "Instead of outlining selections, slop highlights it. This is only useful when --color is set to a transparent color."
  48. flag
  49. off
  50. option "format" f "Set the output format string. Format specifiers are %x, %y, %w, %h, %i, %g, and %c."
  51. string
  52. default="REPLACEME"
  53. optional
  54. text "\nExamples\n"
  55. text " $ # Gray, thick, transparent border for maximum visiblity.\n"
  56. text " $ slop -b 20 -c 0.5,0.5,0.5,0.8\n"
  57. text "\n"
  58. text " $ # Remove window decorations.\n"
  59. text " $ slop --nodecorations\n"
  60. text "\n"
  61. text " $ # Disable window selections. Useful for selecting individual pixels.\n"
  62. text " $ slop -t 0\n"
  63. text "\n"
  64. text " $ # Classic Windows XP selection.\n"
  65. text " $ slop -l -c 0.3,0.4,0.6,0.4\n"
  66. text "\n"
  67. text " $ # Change output format to use safer parsing\n"
  68. text " $ slopoutput=$(slop -f \"%x %y %w %h\")\n"
  69. text " $ X=$(echo $slopoutput | awk '{print $1}')\n"
  70. text " $ Y=$(echo $slopoutput | awk '{print $2}')\n"
  71. text " $ W=$(echo $slopoutput | awk '{print $3}')\n"
  72. text " $ H=$(echo $slopoutput | awk '{print $4}')\n"
  73. text "\nTips\n"
  74. text " * You can use the arrow keys to move the starting point of a drag-selection, just in case you missed it by a few pixels.\n"
  75. text " * If you don't like a selection: you can cancel it by right-clicking regardless of which options are enabled or disabled for slop.\n"
  76. text " * If slop doesn't seem to select a window accurately, the problem could be because of decorations getting in the way. Try enabling the --nodecorations flag.\n"