3 case $# in 1) ;; *) echo >&2 "usage: $1 ZOOM"; exit 2 ;; esac
10 *:*.*) ok=t dpybase=${DISPLAY%.*} ;;
11 *:*) ok=t dpybase=$DISPLAY ;;
13 case ok in nil) echo >&2 "$0: bad DISPLAY"; exit 2 ;; esac
15 set -- $(xqueryptr); scr=$1 x=$2 y=$3
16 DISPLAY=$dpybase.$scr; export DISPLAY
20 case $(( $XWIDTH % $zoom || XHEIGHT % $zoom )) in
22 *) echo >&2 "$0: zoom multiplier doesn't divide screen size"; exit 2 ;;
27 while read _ _ respos name; do
28 res=${respos%%+*} pos=${respos#*+}
29 ww=${res%x*} hh=${res#*x}
31 x0=${pos%+*} y0=${pos#*+}
32 x1=$(( $x0 + $w )) y1=$(( $y0 + $h ))
33 case $(( $x0 <= $x && $x < $x1 && $y0 <= $y && $y < $y1 )) in
38 $(xrandr --listmonitors)
41 case $found in nil) echo >&2 "$0: pointer not on any screen?"; exit 2 ;; esac
45 *) pan="--panning ${XWIDTH}x${XHEIGHT}" ;;
48 xrandr --fb ${XWIDTH}x${XHEIGHT} \
50 --mode $(( $XWIDTH/$zoom ))x$(( $XHEIGHT/$zoom )) \