diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-07-25 20:32:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 20:32:34 +0900 |
| commit | aa3c94f1ad44038d6a71ee8e12a704e6089e31f6 (patch) | |
| tree | 67dc1026bc09a93cb5250e1c28adda15c592aff4 | |
| parent | ff66dd634ca3c61c26d342b8c1f0ffeb5fbc74d1 (diff) | |
| parent | 7ed2aa6c81627626339c48a37be2249ce4ff54bf (diff) | |
Merge pull request #774 from jteijema/Waybar-selection-Highlighting
fix: resolve emoji removal in waybar scripts
| -rwxr-xr-x | config/hypr/scripts/WaybarLayout.sh | 5 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarStyles.sh | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index 955432fc..b4d9c493 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -29,9 +29,10 @@ main() { # Mark and locate the active layout default_row=0 + MARKER="👉" for i in "${!options[@]}"; do if [[ "${options[i]}" == "$current_name" ]]; then - options[i]="👉 ${options[i]}" + options[i]="$MARKER ${options[i]}" default_row=$i break fi @@ -49,7 +50,7 @@ main() { [[ -z "$choice" ]] && { echo "No option selected. Exiting."; exit 0; } # Strip marker before applying - choice=${choice% ⮕} + choice=${choice# $MARKER} case "$choice" in "no panel") diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 20f0873b..a439f8eb 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -31,9 +31,10 @@ main() { # mark the active style and record its index default_row=0 + MARKER="👉" for i in "${!options[@]}"; do if [[ "${options[i]}" == "$current_name" ]]; then - options[i]="👉 ${options[i]}" + options[i]="$MARKER ${options[i]}" default_row=$i break fi @@ -50,7 +51,7 @@ main() { [[ -z "$choice" ]] && { echo "No option selected. Exiting."; exit 0; } # remove annotation and apply - choice=${choice% ⮕} + choice=${choice# $MARKER} apply_style "$choice" } |
