Update selecthover
This commit is contained in:
@@ -2,9 +2,20 @@
|
|||||||
|
|
||||||
CURSORPOS=$(hyprctl cursorpos -j)
|
CURSORPOS=$(hyprctl cursorpos -j)
|
||||||
|
|
||||||
|
X_POS=$(jq '.x' <<< $CURSORPOS)
|
||||||
|
Y_POS=$(jq '.y' <<< $CURSORPOS)
|
||||||
|
|
||||||
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq '.id')
|
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq '.id')
|
||||||
|
|
||||||
hyprctl clients -j | jq ".[] | \
|
hyprctl clients -j | jq "$(cat << EOF
|
||||||
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 \
|
select(.workspace.id == $ACTIVE_WORKSPACE) |
|
||||||
"
|
select(
|
||||||
|
.at[0] <= $X_POS
|
||||||
|
and .at[1] <= $Y_POS
|
||||||
|
and (.at[0] + .size[0] >= $X_POS)
|
||||||
|
and (.at[1] + .size[1] >= $Y_POS)
|
||||||
|
) | .pid
|
||||||
|
EOF
|
||||||
|
)" | tail -n 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user