docs(man): backfill man pages with wiki-only info (source-of-truth pass)

Port information that previously lived only in the GitHub wiki into the
authoritative scdoc man pages, so the man pages become the single source
of truth for module documentation.

33 man pages enriched (options, format replacements, actions, style
selectors, troubleshooting and implementation notes). Additions were
verified against the source; stale/incorrect wiki entries were
deliberately not ported. All pages still compile with scdoc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex
2026-07-04 02:55:57 +02:00
co-authored by Claude Opus 4.8
parent 72fdf77c19
commit a3b39cfcf6
33 changed files with 375 additions and 22 deletions
+51 -3
View File
@@ -61,8 +61,11 @@ Addressed by *custom/<name>*
The format, how information should be displayed. On {text} data gets inserted.
*format-icons*: ++
typeof: array ++
Based on the set percentage, the corresponding icon gets selected. The order is *low* to *high*.
typeof: array or object or string ++
If the type is an array, then based on the set percentage, the corresponding icon gets selected (the order is *low* to *high*). ++
If the type is an object, then the icon is selected according to the *alt* string from the output. ++
If the type is a string, it is pasted as is. ++
Arrays can be nested into objects: icons are then selected first according to *alt*, then percentage.
*rotate*: ++
typeof: integer ++
@@ -163,11 +166,18 @@ When *return-type* is set to *json*, Waybar expects the *exec*-script to output
This should look like this:
```
{"text": "$text", "tooltip": "$tooltip", "class": "$class", "percentage": $percentage }
{"text": "$text", "alt": "$alt", "tooltip": "$tooltip", "class": "$class", "percentage": $percentage }
```
The whole JSON object must be printed on a single line. This can be achieved by
piping the output of your script through *jq --unbuffered --compact-output*.
The *class* parameter also accepts an array of strings.
To have multiline tooltips, use *\\r* in your script to separate the lines. If
using PowerShell for scripting, use the standard newline operator "\`n" in double
quotes; *\\r* and *\\n* will not work.
If nothing or an invalid option is specified, Waybar expects i3blocks style output. Values are *newline* separated.
This should look like this:
@@ -179,6 +189,8 @@ $text\\n$tooltip\\n$class*
# FORMAT REPLACEMENTS
*{}*: Output of the script. Equivalent to *{text}*.
*{text}*: Output of the script.
*{alt}*: The *alt* value from a json return type.
@@ -187,6 +199,11 @@ $text\\n$tooltip\\n$class*
*{icon}*: An icon from 'format-icons' according to percentage.
The *{}* placeholder is special: it automatically displays the text output of your
script, but it cannot be combined with other placeholders like *{icon}* in the same
format string. To display both an icon and text, use *{icon}* together with *{text}*
explicitly (e.g. *"format": "{icon} {text}"*).
# EXAMPLES
## Spotify:
@@ -264,3 +281,34 @@ Under the premise that interval is not defined, you can use the signal and updat
- *<class>* can be set by the script. For more information see *return-type*
- *.flat* and *.text-button* are always applied to the module's label.
- *.image-button* is always applied to the module's image (see *image-path*/*image-name*).
# CONTINUOUS SCRIPTS
The *exec* script may be continuous (i.e. contain some kind of infinite loop). The
display is updated for each new line of data printed on stdout (following the chosen
*return-type*). The *interval* option does not apply to a continuous script; use
*restart-interval* instead to restart the script if it stops after some time.
Be aware that some languages buffer their output. If your module displays nothing
even though your script works as expected, the output may be held in a buffer. Look
up how to flush the output buffer for your language of choice (for example, in Ruby
call *$stdout.flush* after each print).
# OUTPUT NAME
The *exec* script is run with the *WAYBAR_OUTPUT_NAME* environment variable set to
the name of the output (monitor) the bar is displayed on.
# TROUBLESHOOTING
*Self-looping module does not show up*
If your module is self-looping and it does not even show up in the bar, check that:
- Its configuration does *not* include an *interval* parameter.
- Output to stdout is not buffered.
*Custom json class not displayed*
If a class set in your custom script is not picked up by *style.css*, ensure that
the output carrying the most variables is emitted first.