dot_testing/builds/utils/mousehelper

29 lines
487 B
Plaintext
Raw Permalink Normal View History

2023-12-05 21:43:38 -06:00
PADDING=50
eval $(
xdotool getwindowgeometry --shell $(
xdotool getactivewindow
) | \
xargs printf "export %s\n"
)
eval $(
xdotool getmouselocation --shell | \
xargs printf "export MOUSE%s\n"
)
case "$1" in
"top")
xdotool mousemove $MOUSEX $(($Y + $PADDING))
;;
"bottom")
xdotool mousemove $MOUSEX $(($Y + $HEIGHT - $PADDING))
;;
"left")
xdotool mousemove $(($X + $PADDING)) $MOUSEY
;;
"right")
xdotool mousemove $(($X + $WIDTH - $PADDING)) $MOUSEY
;;
esac