diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 14:39:09 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 14:39:09 +0200 |
| commit | 996ad0ca8aa337051aca955a149be063396f732c (patch) | |
| tree | 8e1c75ca1c9606daa008c79c6eb43da81ded7fc7 | |
| parent | 8fb1d0d9840a7e870d71ac902265199942fdf366 (diff) | |
| download | waybar-theme-udt-996ad0ca8aa337051aca955a149be063396f732c.tar.gz waybar-theme-udt-996ad0ca8aa337051aca955a149be063396f732c.zip | |
fix(presentation): read a missing state file as off, not a warning
statusctl no longer emits a down class, so the CSS rule for it and the dialog-warning entry in the icon check are dead. A missing file is the normal pre-write state, not a failure.
| -rwxr-xr-x | bin/wb-icon | 1 | ||||
| -rw-r--r-- | modules/custom/presentation.jsonc | 14 | ||||
| -rw-r--r-- | styles/modules.css | 12 |
3 files changed, 10 insertions, 17 deletions
diff --git a/bin/wb-icon b/bin/wb-icon index 1d76369..b8bb098 100755 --- a/bin/wb-icon +++ b/bin/wb-icon @@ -144,7 +144,6 @@ def selftest(): presentation_icons = [ "preferences-desktop-screensaver", # off "x-office-presentation", # on - "dialog-warning", # no state file ] mail_icons = ["mail-unread"] diff --git a/modules/custom/presentation.jsonc b/modules/custom/presentation.jsonc index 3843cb5..8544b26 100644 --- a/modules/custom/presentation.jsonc +++ b/modules/custom/presentation.jsonc @@ -1,14 +1,14 @@ // Presentation mode, the same module the DP-1 bar runs. // // `statusctl presentation watch` streams waybar JSON on every change: it -// already emits an empty text and a class of activated, deactivated or down, -// so the icon is chosen in CSS from that class and no format is needed here. -// Dropping format-icons is the whole difference from the DP-1 copy, which -// draws the same two states as Nerd Font glyphs. +// already emits an empty text and a class of activated or deactivated, so the +// icon is chosen in CSS from that class and no format is needed here. Dropping +// format-icons is the whole difference from the DP-1 copy, which draws the +// same two states as Nerd Font glyphs. // -// `down` means the state file is missing, which is not the same as off: the -// mode cannot be read at all. It gets its own icon rather than borrowing the -// off one, so a broken watcher does not read as a working bar. +// A missing state file reads as deactivated, not as a warning: that is the +// normal state before anything has written one, and a file cannot report +// whether a watcher is alive anyway. // // statusctl talks to files under XDG_RUNTIME_DIR rather than to quickshell, // so this keeps working while the shell is down. diff --git a/styles/modules.css b/styles/modules.css index b6fd38d..3aa55c6 100644 --- a/styles/modules.css +++ b/styles/modules.css @@ -227,11 +227,9 @@ } /* Presentation mode. statusctl emits the state as a class and an empty text, - * so the icon is chosen here rather than by a format string. - * - * `down` is not `off`: the state file is missing, so the mode cannot be read - * at all. It draws a warning rather than the off icon, because a watcher that - * has died should not look like a mode that is simply not on. */ + * so the icon is chosen here rather than by a format string. A missing state + * file reads as deactivated: it is the normal state before anything has + * written one, not a failure. */ #custom-presentation { background-repeat: no-repeat; background-position: center; @@ -248,7 +246,3 @@ #custom-presentation.activated { background-image: url("@ICON:x-office-presentation@"); } - -#custom-presentation.down { - background-image: url("@ICON:dialog-warning@"); -} |
