locate X mouse pointer?

Ralf Mardorf ralf.mardorf at alice-dsl.net
Fri Sep 30 09:38:06 CEST 2016

>On Thu, 29 Sep 2016 19:16:11 -0500, Marshall Neill wrote:
>>Best I could come up with was
>>mousemove 0 0  upper left corner
>>xdotool mousemove --polar 0 0  move to center of screen.  At least on


Displays for 4 seconds a window at the mouse pointer position:

[weremouse at moonstudio tmp]$ cat demo
xfce4-terminal --geometry=30x1 -T Here\ I\ am 2>/dev/null &
eval $(xdotool getmouselocation --shell)
wmctrl -x -R "$(wmctrl -lx | grep Here\ I\ am | cut -d" " -f4)"
sleep 0.2 # on my machine a value of 0.2 is needed
wmctrl -i -r $(wmctrl -lx | grep Here\ I\ am | cut -d" " -f1) -e "0,$X,$Y,30,1"
sleep 4
wmctrl -x -c "$(wmctrl -lx | grep Here\ I\ am | cut -d" " -f4)"
[weremouse at moonstudio tmp]$ ./demo

The top right corner of the window, is the position of the mouse


More information about the Xfce mailing list