summaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local/bin/focus-restore
blob: 7f87390b9935d154d9ddaa2cde38349d804e04ca (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# Restore unfocused windows from workspace 10 without disrupting master position.
# Records the focused window, brings all back, then swaps it back to master.

FOCUSED=$(hyprctl activewindow -j | jq -r '.address')
hyprctl dispatch plugin:xtd:bringallfrom 10
sleep 0.1
hyprctl dispatch focuswindow "address:$FOCUSED"
hyprctl dispatch layoutmsg swapwithmaster master