diff options
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 40 |
1 files changed, 19 insertions, 21 deletions
@@ -90,6 +90,7 @@ for f in modules/clock.jsonc \ modules/hyprland/workspaces.jsonc \ modules/custom/vmdot.jsonc modules/custom/privacy_dots.jsonc \ modules/custom/presentation.jsonc modules/custom/mail.jsonc \ + modules/custom/launcher.jsonc \ modules/extras/taskbar.jsonc modules/extras/tray.jsonc \ modules/image/volume.jsonc modules/image/language.jsonc; do ln -sfn "$repo/$f" "$target/$f" @@ -104,31 +105,28 @@ 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 launcher module carries no generated path any more: its mark is a CSS +# background, so modules.css owns the paths and the module file is a plain +# symlink like every other. # 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 -# against its own pill, which is exactly what the first version did. -mark="$(sed -n 's/^@define-color main-bg *\(.*\);$/\1/p' "$target/styles/theme.css" | head -1)" -mark="${mark:-#24273a}" -sed "s|@ACCENT@|$mark|" "$repo/icons/slackware.svg" > "$target/slackware.svg" +# tinted here, twice. The pill inverts on hover, so the mark has to invert +# with it: dark on the accent pill at rest, light on the dark pill hovered. +# One mark and one pill colour would always collide in one of the two states, +# which is exactly what shipped twice before this. +mark_dark="$(sed -n 's/^@define-color main-bg *\(.*\);$/\1/p' "$target/styles/theme.css" | head -1)" +mark_light="$(sed -n 's/^@define-color main-fg *\(.*\);$/\1/p' "$target/styles/theme.css" | head -1)" +mark_dark="${mark_dark:-#24273a}" +mark_light="${mark_light:-#cad3f5}" +sed "s|@ACCENT@|$mark_dark|" "$repo/icons/slackware.svg" > "$target/slackware.svg" +sed "s|@MARK_LIGHT@|$mark_light|" "$repo/icons/slackware-light.svg" > "$target/slackware-light.svg" install -Dm644 "$repo/icons/flag-it.svg" "$target/flag-it.svg" install -Dm644 "$repo/icons/burger.svg" "$target/burger.svg" -# The UK flag was replaced by the hamburger for English; drop a copy left by -# an earlier install, or wb-lang's old target lingers on disk unreferenced. -rm -f "$target/flag-gb.svg" +# Files an earlier install generated that nothing references any more. The +# prune above only clears dangling SYMLINKS, and these were written as real +# files, so nothing else removes them: the UK flag the hamburger replaced, and +# the launcher from when it was an image module. +rm -f "$target/flag-gb.svg" "$target/modules/image/launcher.jsonc" # ---------------------------------------------------------------- scripts -- # The two dot scripts used to live only in ~/bin, in no repository at all. |
