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 <value>
12       (typeof: integer).
13
14       •   The state can be addressed as a CSS class in the style.css. The
15           name of the CSS class is the <name> of the state. Each class gets
16           activated when the current value is equal to or less than the con‐
17           figured <value> for the battery module, or equal to or greater than
18           the configured <value> for all other modules.
19
20
21       •   Also, each state can have its own format. Those can be configured
22           via format-<name>, or if you want to differentiate a bit more, as
23           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                                  2023-01-11                  waybar-states(5)
Impressum