From 66a8d05e2461761b60e1b4126437d04dc4f3dbbe Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 14:52:57 +0200 Subject: fix: make the launcher mark load and draw Three faults stacked on the same pill, each hidden by the one before it. A module's `path` is not shell-expanded the way `exec` is, so "$HOME/..." was taken literally, no file was found, and the module drew nothing without logging why. The module file is generated into place now, with the absolute path written in, which is why install.sh removes the target first: an earlier install had symlinked that file, and a redirect onto a surviving link truncates the link's target, which is the repo's own copy. With a real path to try, gdk-pixbuf then refused the file. The XML was well-formed, but the loader sniffs the opening bytes for " --- icons/slackware.svg | 13 +++++++++---- install.sh | 15 ++++++++++++++- modules/image/launcher.jsonc | 8 +++++--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/icons/slackware.svg b/icons/slackware.svg index 0b1f633..bb78bdd 100644 --- a/icons/slackware.svg +++ b/icons/slackware.svg @@ -1,7 +1,12 @@ - + diff --git a/install.sh b/install.sh index a40976b..2769b26 100755 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ for f in modules/clock.jsonc \ modules/custom/vmdot.jsonc modules/custom/privacy_dots.jsonc \ modules/extras/taskbar.jsonc modules/extras/tray.jsonc \ modules/image/volume.jsonc modules/image/idle_inhibitor.jsonc \ - modules/image/language.jsonc modules/image/launcher.jsonc; do + modules/image/language.jsonc; do ln -sfn "$repo/$f" "$target/$f" done @@ -101,6 +101,19 @@ done sed -e "s|@ICONS@|$icons|g" -e "s|@CONFIG@|$target|g" \ "$repo/styles/modules.css" > "$target/styles/modules.css" +# The launcher module is generated for the same reason. A module's `path` is +# NOT shell-expanded the way `exec` is, so it needs the absolute path written +# in: with "$HOME/..." waybar finds no file and the module draws nothing, with +# no error to say why. +# +# The target is removed first. An earlier install symlinked this file, and a +# redirect onto a surviving link writes THROUGH it: the shell truncates the +# link's target, which is the repo's own copy, before sed reads it. That +# emptied the source file once already. +rm -f "$target/modules/image/launcher.jsonc" +sed "s|@CONFIG@|$target|g" \ + "$repo/modules/image/launcher.jsonc" > "$target/modules/image/launcher.jsonc" + # The flags ship as they are; the Slackware mark is monochrome, so it is # tinted here. It sits ON the accent pill, so it takes the bar's background # colour rather than the accent: filled with the accent it would be invisible diff --git a/modules/image/launcher.jsonc b/modules/image/launcher.jsonc index 8c45bc4..7c7b979 100644 --- a/modules/image/launcher.jsonc +++ b/modules/image/launcher.jsonc @@ -5,11 +5,13 @@ // all when its format is empty, and the format has to be empty because the // mark is an icon rather than text. `image` takes a path and needs no label. // -// The path is the installed copy, which carries the udt accent: install.sh -// substitutes it, so the mark follows the scheme. +// This file is GENERATED into place by install.sh, not symlinked: `path` is +// not shell-expanded the way `exec` is, so a "$HOME/..." here is taken +// literally, no file is found, and the module draws nothing without saying so. +// @CONFIG@ becomes the absolute install directory. { "image#launcher": { - "path": "$HOME/.config/waybar-udt/slackware.svg", + "path": "@CONFIG@/slackware.svg", "size": 18, "tooltip": false, "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer toggle" -- cgit v1.2.3