From a746812504de8b6f66b27d45444e114a4e9595ef Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Fri, 19 Sep 2025 20:38:53 -0400 Subject: [PATCH] Limit pattern to prevent incorrect matches --- bin/omarchy-launch-or-focus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/omarchy-launch-or-focus b/bin/omarchy-launch-or-focus index af63f007..a0075632 100755 --- a/bin/omarchy-launch-or-focus +++ b/bin/omarchy-launch-or-focus @@ -7,7 +7,7 @@ fi WINDOW_PATTERN="$1" LAUNCH_COMMAND="${2:-"uwsm app -- $WINDOW_PATTERN"}" -WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class+" "+.title)|test($p;"i"))|.address' | head -n1) +WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1) if [[ -n $WINDOW_ADDRESS ]]; then hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"