dotfiles/scripts/mouseControll.sh
2024-11-30 21:52:04 +01:00

17 lines
367 B
Bash
Executable file

#!/bin/sh
eval $(xdotool getmouselocation --shell)
case $1 in
# mouse moving
"left" | "l") xdotool mousemove $(($X-25)) $Y ;;
"right" | "r") xdotool mousemove $(($X+25)) $Y ;;
"up" | "u") xdotool mousemove $X $(($Y-25)) ;;
"down" | "d") xdotool mousemove $X $(($Y+25)) ;;
# mouse buttons pressing
1) xdotool click 1 ;;
2) xdotool click 3 ;;
esac