Merge pull request #1772 from kj/fix-states-documentation

This commit is contained in:
Alex 2022-11-07 09:13:41 +01:00 committed by GitHub
commit 1a1c617520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 14 deletions

View File

@ -37,8 +37,8 @@ The *backlight* module displays the current backlight level.
Positive value to rotate the text label.
*states*: ++
typeof: array ++
A number of backlight states which get activated on certain brightness levels.
typeof: object ++
A number of backlight states which get activated on certain brightness levels. See *waybar-states(5)*.
*on-click*: ++
typeof: string ++

View File

@ -33,7 +33,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y
The interval in which the information gets polled.
*states*: ++
typeof: array ++
typeof: object ++
A number of battery states which get activated on certain capacity levels. See *waybar-states(5)*.
*format*: ++

View File

@ -42,7 +42,7 @@ The *cpu* module displays the current cpu utilization.
Positive value to rotate the text label.
*states*: ++
typeof: array ++
typeof: object ++
A number of cpu usage states which get activated on certain usage levels. See *waybar-states(5)*.
*on-click*: ++

View File

@ -32,7 +32,7 @@ Addressed by *disk*
Positive value to rotate the text label.
*states*: ++
typeof: array ++
typeof: object ++
A number of disk utilization states which get activated on certain percentage thresholds (percentage_used). See *waybar-states(5)*.
*max-length*: ++

View File

@ -32,7 +32,7 @@ Addressed by *memory*
Positive value to rotate the text label.
*states*: ++
typeof: array ++
typeof: object ++
A number of memory utilization states which get activated on certain percentage thresholds. See *waybar-states(5)*.
*max-length*: ++

View File

@ -43,8 +43,8 @@ Additionally you can control the volume by scrolling *up* or *down* while the cu
Positive value to rotate the text label.
*states*: ++
typeof: array ++
A number of volume states which get activated on certain volume levels. See *waybar-states(5)*
typeof: object ++
A number of volume states which get activated on certain volume levels. See *waybar-states(5)*.
*max-length*: ++
typeof: integer ++

View File

@ -7,14 +7,13 @@ apply a class when the value matches the declared state value.
# STATES
- Every entry (*state*) consists of a *<name>* (typeof: *string*) and a *<value>* (typeof: *integer*).
Every entry (*state*) consists of a *<name>* (typeof: *string*) and a *<value>* (typeof: *integer*).
- The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the *<name>* of the state.
Each class gets activated when the current capacity is equal or below the configured *<value>*.
- The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the *<name>* of the state.
Each class gets activated when the current value is equal to or less than the configured *<value>* for the *battery* module, or equal to or greater than the configured *<value>* for all other modules.
- Also each state can have its own *format*.
Those can be configured via *format-<name>*.
Or if you want to differentiate a bit more even as *format-<status>-<state>*.
- Also, each state can have its own *format*.
Those can be configured via *format-<name>*, or if you want to differentiate a bit more, as *format-<status>-<state>*.
# EXAMPLE