From ba5592c86aee3cb8d8e81682ee7e5d7f3f8e2053 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:49:04 +0100 Subject: [PATCH] Add waybar-states(5) --- man/waybar-states.5.scd | 43 +++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 44 insertions(+) create mode 100644 man/waybar-states.5.scd diff --git a/man/waybar-states.5.scd b/man/waybar-states.5.scd new file mode 100644 index 00000000..588f21da --- /dev/null +++ b/man/waybar-states.5.scd @@ -0,0 +1,43 @@ +waybar-states(5) + +# OVERVIEW + +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. + +# STATES + +- Every entry (*state*) consits of a ** (typeof: *string*) and a ** (typeof: *integer*). + + - The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the ** of the state. + Each class gets activated when the current capacity is equal or below the configured **. + + - Also each state can have its own *format*. + Those con be configured via *format-*. + Or if you want to differentiate a bit more even as *format--*. + +# EXAMPLE + +``` +"battery": { + "bat": "BAT2", + "interval": 60, + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""], + "max-length": 25 +} +``` + +# STYLING STATES + +- *#battery.* + - ** can be defined in the *config*. + +# EXAMPLE: + +- *#battery.warning: { background: orange; }* +- *#battery.critical: { background: red; }* diff --git a/meson.build b/meson.build index 78a556a6..51ffeb6a 100644 --- a/meson.build +++ b/meson.build @@ -176,6 +176,7 @@ if scdoc.found() 'waybar-sway-workspaces.5.scd', 'waybar-temperature.5.scd', 'waybar-tray.5.scd', + 'waybar-states.5.scd', ] foreach filename : man_files