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
>>or
>>xdotool mousemove --polar 0 0  move to center of screen.  At least on
>>mine.

PPS: 

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

[weremouse at moonstudio tmp]$ cat demo
#!/bin/bash
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)"
exit
[weremouse at moonstudio tmp]$ ./demo

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

Regards,
Ralf


More information about the Xfce mailing list