1waybar-states(5)              File Formats Manual             waybar-states(5)
2
3
4

OVERVIEW

6       Some modules support 'states' which allows percentage values to be used
7       as styling triggers to apply a class when the value matches the de‐
8       clared state value.
9

STATES

11       •   Every entry (state) consists of a <name> (typeof: string) and a
12           <value> (typeof: integer).
13
14
15           •   The state can be addressed as a CSS class in the style.css. The
16               name of the CSS class is the <name> of the state. Each class
17               gets activated when the current capacity is equal or below the
18               configured <value>.
19
20
21           •   Also each state can have its own format. Those can be config‐
22               ured via format-<name>. Or if you want to differentiate a bit
23               more even as format-<status>-<state>.
24
25

EXAMPLE

27           "battery": {
28                "bat": "BAT2",
29                "interval": 60,
30                "states": {
31                     "warning": 30,
32                     "critical": 15
33                },
34                "format": "{capacity}% {icon}",
35                "format-icons": ["", "", "", "", ""],
36                "max-length": 25
37           }
38

STYLING STATES

40#battery.<state> - <state> can be defined in the config.
41
42

EXAMPLE:

44#battery.warning: { background: orange; }
45#battery.critical: { background: red; }
46
47
48
49                                  2022-05-23                  waybar-states(5)
Impressum