diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 13:01:40 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 13:01:40 +0200 |
| commit | 1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118 (patch) | |
| tree | 9cd12f0520c008096e9396eca4e0234d1ba3eff0 /install.sh | |
| parent | e996b6626c85f8cefb0f357d128091e350ee0ec0 (diff) | |
| download | waybar-theme-udt-1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118.tar.gz waybar-theme-udt-1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118.zip | |
fix: draw the launcher, and prune stale links on install
A custom module renders nothing at all when its format is empty, and the
format has to be empty because the Slackware mark is an icon rather than
text, so the launcher pill never appeared. It is an image module now, which
takes a path and needs no label: the same reason the language flag is one.
install.sh only ever added links, so the module file this replaces left a
dangling symlink behind that every later install would step over. It now
prunes links whose source has gone, and a reinstall repairs itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -76,14 +76,19 @@ else: # ------------------------------------------------------------------ files -- # Config and modules are symlinked: this repo owns them outright, so linking # means the installed bar cannot drift from what is committed. +# +# Links whose source has gone are pruned first. Linking alone never removes +# anything, so a module renamed or dropped in the repo would otherwise leave a +# dangling link behind for every later install to step over. +find "$target" -xtype l -delete 2>/dev/null || true + ln -sfn "$repo/config.jsonc" "$target/config.jsonc" for f in modules/clock.jsonc \ modules/hyprland/workspaces.jsonc \ - modules/custom/launcher.jsonc modules/custom/vmdot.jsonc \ - modules/custom/privacy_dots.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; do + modules/image/language.jsonc modules/image/launcher.jsonc; do ln -sfn "$repo/$f" "$target/$f" done |
