18 lines
367 B
Bash
18 lines
367 B
Bash
|
#!/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
|