Files
fish/functions/lost_window.fish
T
2026-08-03 22:54:04 +02:00

22 lines
521 B
Fish

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 <number>"
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