i3: Always move cursor to focused window

This commit is contained in:
Geoffrey Frogeye 2019-10-30 16:39:55 +01:00
parent 5258e016ef
commit 90ca29d35c
2 changed files with 78 additions and 66 deletions

12
config/i3/focus_windows Executable file
View file

@ -0,0 +1,12 @@
#!/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