mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Need to have fuzzy match to work with the web apps for matching
This commit is contained in:
@@ -7,7 +7,7 @@ fi
|
|||||||
|
|
||||||
WINDOW_PATTERN="$1"
|
WINDOW_PATTERN="$1"
|
||||||
LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}"
|
LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}"
|
||||||
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)
|
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
|
if [[ -n $WINDOW_ADDRESS ]]; then
|
||||||
hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
|
hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
|
||||||
|
|||||||
Reference in New Issue
Block a user