aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh15
1 files changed, 14 insertions, 1 deletions
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