#!/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