#!/usr/bin/env bash CURSORPOS=$(hyprctl cursorpos -j) ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq '.id') hyprctl clients -j | jq ".[] | \ select(.workspace.id == $ACTIVE_WORKSPACE) | \ select(.at[0] <= $(jq '.x' <<< $CURSORPOS) and .at[1] <= $(jq '.y' <<< $CURSORPOS) and (.at[0] + .size[0] >= $(jq '.x' <<< $CURSORPOS)) and (.at[1] + .size[1] >= $(jq '.y' <<< $CURSORPOS))) | .pid \ "