aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icons/slackware.svg13
-rwxr-xr-xinstall.sh15
-rw-r--r--modules/image/launcher.jsonc8
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 @@
-<!-- Slackware logo, from Simple Icons (CC0 1.0 Universal).
- @ACCENT@ is substituted by install.sh. The mark sits on the accent pill,
- so it is filled with the bar's background colour, not the accent: the
- accent would put it on top of itself and render it invisible. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
+ <!-- Slackware logo, from Simple Icons (CC0 1.0 Universal).
+ @ACCENT@ is substituted by install.sh with the bar's background colour,
+ not the accent: the mark sits on the accent pill, and filling it with
+ the accent would draw it on top of itself.
+
+ The root <svg> element stays the FIRST thing in this file. gdk-pixbuf
+ sniffs the opening bytes for "<svg" to pick its loader, so a comment
+ before the root tag pushes it out of that window and every consumer
+ reports "couldn't recognize the image file format" on valid XML. -->
<path fill="@ACCENT@" d="M12.924 1.228c-.584-.01-1.251 0-1.485.027-2.46.282-4.138 1.3-4.753 2.891-.218.552-.274 1.002-.243 1.772.048 1.21.419 2.004 1.262 2.742 1.225 1.06 2.98 1.508 5.998 1.508 2.737 0 3.71.413 3.916 1.675.313 1.867-1.57 3.07-4.414 2.827-1.878-.16-3.496-.912-4.223-1.967a7.772 7.772 0 01-.355-.62c-.382-.76-.64-.978-1.176-.978-.43.005-.732.165-.918.494l-.133.24v4.03l.137.296c.165.344.4.546.744.63.35.09.794-.036 1.42-.402l.5-.29.826.185c1.82.403 2.75.523 4.065.523 1.103.005 1.548-.046 2.455-.285 1.124-.297 1.974-.785 2.717-1.57.8-.844 1.15-1.853 1.097-3.147-.069-1.628-.695-2.698-2-3.414-.96-.525-2.292-.79-4.377-.88-2.042-.086-2.794-.155-3.515-.32-.51-.12-.785-.25-1.076-.515-.653-.589-.59-1.755.136-2.482.642-.637 1.511-.928 2.774-.928 1.432.005 2.393.27 3.412.955.185.127.721.62 1.193 1.092.886.902 1.135 1.082 1.506 1.082.244 0 .59-.163.732-.344.26-.329.303-.63.303-2.2 0-1.66-.043-1.91-.377-2.282-.387-.425-.848-.42-1.75.031l-.59.297-.63-.17c-1.496-.392-2.038-.477-3.178-.504zM0 13.775v9h24v-1H1v-8z"/>
</svg>
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"