Add selecthover script

This commit is contained in:
2024-01-31 00:52:24 +00:00
parent edaf1d4164
commit f09a93c7c0

10
scripts/selecthover Executable file
View File

@@ -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 \
"