-
-
Notifications
You must be signed in to change notification settings - Fork 710
States
Sherirk edited this page Apr 7, 2024
·
8 revisions
- 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.
- Every entry (state) consists of a
<name>
(typeof:string
) and a<value>
(typeof:integer
).- The
<value>
determines the percentage value above which a state is applied, except for the battery and pulseaudio modules, for which it is activated below the given 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. - Also each state can have its own
format
. Those can be configured viaformat-<name>
. Or if you want to differentiate a bit more even asformat-<status>-<state>
. For more information see custom formats.
- The
"battery": {
"bat": "BAT2",
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
}
-
#battery.<state>
-
<state>
can be defined in theconfig
. For more information seestates
-
#battery.warning: { background: orange; }
#battery.critical: { background: red; }
- Home
- Installation
- Configuration
- Styling
- Examples
- FAQ
- Modules:
- Backlight/Slider
- Backlight
- Battery
- Bluetooth
- CPU
- Cava
- Clock
- Custom
- DWL
- Disk
- Gamemode
- Group
- Hyprland
- Idle Inhibitor
- Image
- JACK
- Keyboard State
- Language
- Load
- MPD
- MPRIS
- Memory
- Network
- Niri
- Power Profiles Daemon
- Privacy
- PulseAudio/Slider
- PulseAudio
- River
- Sndio
- Sway
- Systemd failed units
- Taskbar
- Temperature
- Tray
- UPower
- User
- WirePlumber
- Workspaces
- Writing Modules