From 9adfac969af75a09054f1eb6f1894ab6bdf8b2a5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 16:53:34 +0200 Subject: feat: split the bar in two on DP-3 DP-3 is rotated, so a bar there is 1080px wide rather than 1920, and one bar holding every module was too crowded. Status sits on top now, the desktop itself along the bottom: workspaces on the left, open windows on the right. Both bars are one waybar process reading one stylesheet, because waybar takes a top-level array of bars, so the two cannot drift apart. Presentation mode is the statusctl-backed module the DP-1 bar already runs, rather than the wb-idle module written for this bar. It talks to files under XDG_RUNTIME_DIR instead of to quickshell, so it keeps working while the shell is down, and it already emits a state class, so the glyphs are simply dropped and the icon chosen in CSS. wb-idle and its module are gone. The module needs a format of one space. It defaults to "{text}", statusctl emits an empty text, and waybar draws no widget at all for a custom module whose formatted output is empty: not an empty pill, no pill. That is the same trap the launcher hit, and it cost a wrong diagnosis on the way: a min-height was added first on the theory that the pill was collapsing, which was treating a symptom of a widget that did not exist. A forced red background proved it was never drawn at all. Co-Authored-By: Claude Opus 5 --- modules/custom/presentation.jsonc | 28 ++++++++++++++++++++++++++++ modules/image/idle_inhibitor.jsonc | 15 --------------- 2 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 modules/custom/presentation.jsonc delete mode 100644 modules/image/idle_inhibitor.jsonc (limited to 'modules') diff --git a/modules/custom/presentation.jsonc b/modules/custom/presentation.jsonc new file mode 100644 index 0000000..3843cb5 --- /dev/null +++ b/modules/custom/presentation.jsonc @@ -0,0 +1,28 @@ +// 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. +// +// `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. +// +// statusctl talks to files under XDG_RUNTIME_DIR rather than to quickshell, +// so this keeps working while the shell is down. +// The format is a single space, and it has to be something. It defaults to +// "{text}", statusctl emits an empty text, and waybar draws no widget at all +// for a custom module whose formatted output is empty: not an empty pill, no +// pill. A space gives the label real content to be allocated for, shows +// nothing itself, and leaves the icon to the CSS background. +{ + "custom/presentation": { + "exec": "$HOME/bin/statusctl presentation watch", + "return-type": "json", + "on-click": "$HOME/bin/statusctl presentation toggle", + "format": " ", + "tooltip": true + } +} diff --git a/modules/image/idle_inhibitor.jsonc b/modules/image/idle_inhibitor.jsonc deleted file mode 100644 index e026be8..0000000 --- a/modules/image/idle_inhibitor.jsonc +++ /dev/null @@ -1,15 +0,0 @@ -// Presentation mode. -// -// waybar's own idle_inhibitor module draws its state with format-icons, which -// is text, so this is an `image` module driving the same inhibitor through -// hyprland. The state lives in a file because the icon has to be resolved by -// a separate process from the one that toggles it. -{ - "image#idle": { - "exec": "$HOME/bin/wb-idle status", - "size": 22, - "interval": 5, - "signal": 9, - "on-click": "$HOME/bin/wb-idle toggle" - } -} -- cgit v1.2.3