Você pode usar apenas o comando xdotool da seguinte forma:
xdotool getmouselocation
Você pode usar watch xdotool getmouselocation para sondagem interativa ou se for para o script bash - escrever um loop infinito while.
while true
do
xdotool getmouselocation
done