diff --git a/scripts/selecthover b/scripts/selecthover new file mode 100755 index 0000000..d47e8e4 --- /dev/null +++ b/scripts/selecthover @@ -0,0 +1,10 @@ +#!/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 \ +"