#!/usr/bin/env fish
set win_addr NULL
set win_addr (hyprctl clients -j|jq -r '.[] | select(.title != "") | "\(.address)[窗口]   [位于工作区:\(.workspace.id)]   \(.title)  @\(.class)"'|wofi --show dmenu,drun -i -M fuzzy |cut -f1 -d\[|head -1)
#-i 不考虑大小写; -M fuzzy 模糊搜索

if echo $win_addr | grep ^0x 1>/dev/null
	hyprctl dispatch focuswindow address:"$win_addr"
end

