Skip to content

Instantly share code, notes, and snippets.

@elhenro
Created June 16, 2019 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elhenro/a799c64a02d590af7714988c5932608d to your computer and use it in GitHub Desktop.
Save elhenro/a799c64a02d590af7714988c5932608d to your computer and use it in GitHub Desktop.
#!/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