locate X mouse pointer?
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Fri Sep 30 09:19:47 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.
To get a start position nobody needs a command. The OP can't always see
the cursor. It would be possible to open a text box at the current
cursor position, that follows the cursor, using xdotool and wmctrl [1],
but I would try to find a very large cursor theme and write a script to
switch between a normal cursor theme and a very large theme for using
the laptop outdoors under the sun.
Regards,
Ralf
[1]
There likely is a way to stop a similar script by a click. I've got no
time to search how to do it.
[weremouse at moonstudio tmp]$ cat demo
#!/bin/bash
xfce4-terminal --geometry=30x1 -T Here\ I\ am 2>/dev/null &
i=1
#echo -e "\e[?1000h"
#http://stackoverflow.com/questions/8361263/detect-mouse-click-in-bash-script
while [ $i -gt 0 ]; do
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"
#read -n 6
#if [ $? != 0 ]; then
# echo "test" # wmctrl -x -c "$(wmctrl -lx | grep Here\ I\ am | cut -d" " -f4)"
#fi
###push Ctrl+Alt+Fn to "killall demo" or comment out "sleep 2" to have enough time for pressing Ctrl+C
###sleep 2
done
exit
[weremouse at moonstudio tmp]$ ./demo
More information about the Xfce
mailing list