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 --- bin/wb-idle | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100755 bin/wb-idle (limited to 'bin/wb-idle') diff --git a/bin/wb-idle b/bin/wb-idle deleted file mode 100755 index 05c4a8c..0000000 --- a/bin/wb-idle +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -# Presentation mode: keep the screen awake, and say so with a themed icon. -# Copyright (C) 2026 Danilo M. -# Licensed under the GNU General Public License v2 only. -# -# waybar's own idle_inhibitor module draws its state with format-icons, which -# is text. This drives the same idea through hypridle and reports the state as -# an icon path for an `image` module instead. -# -# wb-idle status # print "$path\n$tooltip" for the image module -# wb-idle toggle # flip the inhibitor, then refresh the module -# -# The inhibitor is hypridle's own pause, so nothing else has to be running. -set -euo pipefail - -state_file="${XDG_RUNTIME_DIR:-/tmp}/wb-idle.state" - -active() { [[ -f "$state_file" ]]; } - -case "${1:-status}" in -toggle) - if active; then - rm -f "$state_file" - # Resume idling. Guarded: hypridle may not be running, and that is - # not an error worth failing a click over. - pkill -USR2 -x hypridle 2>/dev/null || true - else - touch "$state_file" - pkill -USR1 -x hypridle 2>/dev/null || true - fi - # Refresh the module now rather than waiting for its interval. - pkill -RTMIN+9 -x waybar 2>/dev/null || true - ;; -status) - if active; then - wb-icon idle activated - else - wb-icon idle deactivated - fi - ;; -*) - echo "usage: wb-idle " >&2 - exit 2 - ;; -esac -- cgit v1.2.3