2 # resize.sh mouseX mouseY windowW windowH
3 # Emits an FVWM directed resize command based on the position of the mouse
4 # cursor within a window (mouseX, mouseY) and the width and height of the
5 # window (windowW, windowH).
8 echo "usage: $0 mouseX mouseY windowW windowH"
12 echo -n "Resize Direction "
15 if [ $1 -le $(($3/4)) -a $2 -ge $(($4/3)) -a $2 -le $(($4/3*2)) ]; then
17 elif [ $1 -ge $(($3/4*3)) -a $2 -ge $(($4/3)) -a $2 -le $(($4/3*2)) ]; then
19 elif [ $2 -le $(($4/4)) -a $1 -ge $(($3/3)) -a $1 -le $(($3/3*2)) ]; then
21 elif [ $2 -ge $(($4/4*3)) -a $1 -ge $(($3/3)) -a $1 -le $(($3/3*2)) ]; then
24 elif [ $1 -le $(($3/2)) ]; then
25 if [ $2 -le $(($4/2)) ]; then
31 if [ $2 -le $(($4/2)) ]; then