.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "waybar-states" "5" "2024-05-05" .PP .SH NAME .PP waybar - states property .PP .SH OVERVIEW .PP Some modules support '\&states'\& which allows percentage values to be used as styling triggers to apply a class when the value matches the declared state value.\& .PP .SH STATES .PP Every entry (\fBstate\fR) consists of a \fB\fR (typeof: \fBstring\fR) and a \fB\fR (typeof: \fBinteger\fR).\& .PP .PD 0 .IP \(bu 4 The state can be addressed as a CSS class in the \fBstyle.\&css\fR.\& The name of the CSS class is the \fB\fR of the state.\& Each class gets activated when the current value is equal to or less than the configured \fB\fR for the \fBbattery\fR module, or equal to or greater than the configured \fB\fR for all other modules.\& .PD .PP .PD 0 .IP \(bu 4 Also, each state can have its own \fBformat\fR.\& Those can be configured via \fBformat-\fR, or if you want to differentiate a bit more, as \fBformat--\fR.\& .PD .PP .SH EXAMPLE .PP .nf .RS 4 "battery": { "bat": "BAT2", "interval": 60, "states": { "warning": 30, "critical": 15 }, "format": "{capacity}% {icon}", "format-icons": ["", "", "", "", ""], "max-length": 25 } .fi .RE .PP .SH STYLING STATES .PP .PD 0 .IP \(bu 4 \fB#battery.\&\fR - \fB\fR can be defined in the \fBconfig\fR.\& .PD .PP .SH EXAMPLE: .PP .PD 0 .IP \(bu 4 \fB#battery.\&warning: { background: orange; }\fR .IP \(bu 4 \fB#battery.\&critical: { background: red; }\fR