unfortunately this does not help me. I made a window moving script. Moving the window (the pointer) at the left or right screenedge resizes it to half screen. This works quite good. But when clicking to move the window somewhere else the script continues. Maybe I should use some timeout/ a loop like your example.
Code:
#!/bin/bash
xte 'keydown Alt_L' ;xte 'key F7' ;xte 'keyup Alt_L'
xa1=5
xa2=1270
dskb=1256
dskh=800
while :; do
akposx=$(xmousepos |awk '{print $1}')
akposy=$(xmousepos |awk '{print $2}')
if [ $akposx -lt $xa1 ]; then
xte 'mouseclick 1'
wmctrl -r :ACTIVE: -e "0,0,0,$(($dskb/2)),$(($dskh))"
exit;
fi
if [ $akposx -gt $xa2 ]; then
xte 'mouseclick 1'
wmctrl -r :ACTIVE: -e "0,$(($dskb/2)),0,$(($dskb/2)),$(($dskh))"
exit;
fi
done
Bookmarks