Created
August 19, 2021 00:12
-
-
Save snoble/2c0a3bf95183f8f8043d98af2d43a2f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
eval $(xdotool getactivewindow getwindowgeometry | | |
sed -n -e "s/^ \+Position: \+\([0-9]\+\),\([0-9]\+\).*/x=\1;y=\2/p" \ | |
-e "s/^ \+Geometry: \+\([0-9]\+\)x\([0-9]\+\).*/w=\1;h=\2/p" ) | |
let ox=$w/3 | |
let mx=$x+$ox | |
let oy=$h/3 | |
let my=$y+$oy | |
xdotool mousemove $mx $my |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment