Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
XDT=/usr/bin/xdotool
WINDOW=`$XDT getwindowfocus`
# this brings in variables WIDTH and HEIGHT
eval `xdotool getwindowgeometry --shell $WINDOW`
TX=`expr $WIDTH / 2`
TY=`expr $HEIGHT / 2`
$XDT mousemove -window $WINDOW $TX $TY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.