function lost_window if not command -q hyprctl echo "Only works with Hyprland compositor." return 1 end if test (count $argv) -lt 1 echo "Usage: lost_window " return 1 end if test (count $argv) -lt 2 set addr (hyprctl clients -j \ | jq -r '.[] | select(.workspace.id == '$argv[1]') | .address' \ | head -n1) test -n "$addr"; or return 1 hyprctl dispatch "hl.dsp.focus({window = 'address:$addr'})" end end