I am trying to figure out how to make a script that operates in the following way:
- finds dimensions of the display which the mouse pointer is currently on
- moves the mouse pointer to the center of the left edge on that display
- I'd like to be able to add command arguments when running the script that would add or subtract to the center left edge position and move the mouse accordingly. For example if I ran:
python3 /path/to/script.py
then the script would place the mouse pointer on left edge of display and in the center of the vertical axis. If I ran this:
python3 /path/to/script.py 10 -10
then the script would place the mouse pointer 10px --> from left edge of screen, and -10px (down) from center of vertical axis.
I'm pretty sure xdotool and python can accomplish this, but I am a complete noob when it comes to programming anything, and even though I found this link, I'm still not sure how to proceed. If anyone feels so kind as to help me out with this, it would be greatly appreciated, but if not then no worries.
If anyone is curious as to why I want to do this: I'm setting up a tablet to use i3wm. I'm creating touch button shortcuts for i3 window management using jgmenu. Jgmenu has an option to launch at the location of the mouse pointer. I would like to use a touchegg gesture to first move the mouse pointer with this script, then launch jgmenu.