xprop for Hyprland
hyprland
obviously- hyprevents capture window changed events to rerun slurp
socat
to connect hyprevents with hyprprop eventsslurp
to select an area on the screenjq
to parse hyprctl outputmake
yay -S hyprprop-git
or
sudo make install
Just run
hyprprop
and select desired window
Currently, there is no event triggered when a special workspace is opened or closed, so the only way to force slurp to redraw automatically is to add keybind for sending the signal to the hyprprop using the same key as togglespecialworkspace:
bind = $mod, <KEY>, togglespecialworkspace,
bind = $mod, <KEY>, exec, kill -USR1 "$(cat /tmp/hyprprop.pid)"
By binding both commands to the same key, Hyprland will execute them sequentially whenever the key is pressed.