sleep 1
tmp=`mktemp`
trap "rm -f $tmp $tmp.png $tmp.webp $tmp.txt" HUP PIPE INT QUIT TERM EXIT
-[ "$1" = "root" ] && root="-window root" || root=""
+[ "$1" = "root" ] && {
+ root="-window root" || root=""
+ shift
+}
import $root $tmp.png
my-cwebpl -o $tmp.webp $tmp.png
-paster $tmp.webp > $tmp.txt
+if [ "$1" = no ]; then
+ fn=/tmp/`dd if=/dev/urandom bs=8 count=1 2>/dev/null | xxd -p`.webp
+ mv $tmp.webp $fn
+ echo $fn | tee $tmp.txt
+else
+ paster $tmp.webp > $tmp.txt
+fi
xmessage -file $tmp.txt