All pastes #89064 Raw Edit

ened

public text v1 · immutable
#89064 ·published 2006-07-15 18:50 UTC
rendered paste body
#!/bin/sh

SAVEX=10
SAVEY=10


if test -f ~/.warpcoords ; then
	. ~/.warpcoords
fi

if test ! -z "`wmiir read /view/sel/sel/geom`" ; then
	COORDS="`wmiir read /view/sel/sel/geom`"
	OLDX="`echo $COORDS | awk -F ' ' '{print $1+20}'`"
	OLDY="`echo $COORDS | awk -F ' ' '{print $2+20}'`"
else
	OLDX=$SAVEX
	OLDY=$SAVEX
fi

if test "$DISPLAY" = ":0.1" ; then
	SAVEDISP=":0.0"
else
	SAVEDISP=":0.1"
fi

DISPLAY=$SAVEDISP wmiiwarp $SAVEX $SAVEY


echo "SAVEDISP=$DISPLAY" > ~/.warpcoords
echo "SAVEX=$OLDX" >> ~/.warpcoords
echo "SAVEY=$OLDY" >> ~/.warpcoords