Browse Source

Document format specifiers

Winston Weinert 6 years ago
parent
commit
1e2c1e85e3
2 changed files with 7 additions and 3 deletions
  1. 1
    1
      slop.1
  2. 6
    2
      src/main.cpp

+ 1
- 1
slop.1 View File

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.
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
35
 .TP
36
 .BR \-f ", " \-\-format=\fISTRING\fR
36
 .BR \-f ", " \-\-format=\fISTRING\fR
37
-Sets the output format for slop. Format specifiers are %x, %y, %w, %h, %i, %c, and %g. If actual percentage signs are desired in output, use a double percentage sign like so `%%`.
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
38
 .TP
39
 .BR \-n ", " \-\-nodecorations=INT
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`.
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`.

+ 6
- 2
src/main.cpp View File

191
     std::cout << "  -r, --shader=STRING           Sets the shader to load and use from\n";
191
     std::cout << "  -r, --shader=STRING           Sets the shader to load and use from\n";
192
     std::cout << "                                  ~/.config/slop/\n";
192
     std::cout << "                                  ~/.config/slop/\n";
193
     std::cout << "  -f, --format=STRING           Set the output format string. Format specifiers\n";
193
     std::cout << "  -f, --format=STRING           Set the output format string. Format specifiers\n";
194
-    std::cout << "                                  are %x, %y, %w, %h, %i, %g, and %c.\n";
195
-    std::cout << "                                  (default=`%g\n')\n";
194
+    std::cout << "                                  are %x (x offset), %y (y offset), %w (width),\n";
195
+    std::cout << "                                  %h (height), %i (window id),\n";
196
+    std::cout << "                                  %g (geometry - `%wx%h+%x+%y\'),\n";
197
+    std::cout << "                                  %c (1 if cancelled, 0 otherwise),\n";
198
+    std::cout << "                                  and %% for a literal percent sign.\n";
199
+    std::cout << "                                  (default=`%g')\n";
196
     std::cout << "  -o, --noopengl                Disable graphics acceleration.\n";
200
     std::cout << "  -o, --noopengl                Disable graphics acceleration.\n";
197
     std::cout << "Examples\n";
201
     std::cout << "Examples\n";
198
     std::cout << "    $ # Gray, thick, transparent border for maximum visiblity.\n";
202
     std::cout << "    $ # Gray, thick, transparent border for maximum visiblity.\n";