move $path definition from apply-color* scripts to helper script

This commit is contained in:
2025-11-15 02:00:43 +01:00
parent 163cfda11e
commit 94be67bf43
16 changed files with 14 additions and 32 deletions

View File

@@ -1,6 +1,5 @@
#!/bin/bash
path=$(dirname "$(readlink -f "$0")")
[ -f "$HOME/.local/snippets/apply-color-helper" ] || {
echo "Missing helper script: $HOME/.local/snippets/apply-color-helper"
exit 1
@@ -14,11 +13,12 @@ sed -i "s|^\$border: #[0-9a-fA-F]\{6\};\$|\$border: #${colorHex};|" "$file" || {
exit 1
}
if pgrep -x eww >/dev/null -u "$USER"; then
if pgrep -x eww -u "$USER" >/dev/null; then
eww reload || {
log_error "Failed to reload eww, is it running?"
exit 1
}
fi
log_success "eww"
log_success "eww"