dotfiles/scripts/mouseControll.sh

18 lines
367 B
Bash
Raw Normal View History

2024-11-30 21:52:04 +01:00
#!/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