From 1195ecd49921dc4e243454450440de24f5ab4d76 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 20 Oct 2025 14:23:03 -0400 Subject: Waybar: fix rofi selection marker stripping; prevent embedding 👉 in symlink names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: reselecting the current style/layout left the '👉 ' prefix in the choice, so the symlink target included it (e.g., style.css -> .../👉 [0 VERTICAL] [Catpuccin] Mocha.css). Cause: options are annotated as "👉 ${name}", but the code used: choice=${choice# $MARKER} (matches ' 👉'), not the actual prefix '👉 '. Fix: use choice=${choice#"$MARKER "} in WaybarStyles.sh and WaybarLayout.sh. Result: selecting the same item no longer pollutes the symlink target. --- config/hypr/scripts/WaybarLayout.sh | 2 +- config/hypr/scripts/WaybarStyles.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index b4d9c493..f65c9c00 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -50,7 +50,7 @@ main() { [[ -z "$choice" ]] && { echo "No option selected. Exiting."; exit 0; } # Strip marker before applying - choice=${choice# $MARKER} + choice=${choice#"$MARKER "} case "$choice" in "no panel") diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index a439f8eb..15767c2a 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -51,7 +51,7 @@ main() { [[ -z "$choice" ]] && { echo "No option selected. Exiting."; exit 0; } # remove annotation and apply - choice=${choice# $MARKER} + choice=${choice#"$MARKER "} apply_style "$choice" } -- cgit v1.2.3