X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=bin%2Fbin%2Fmkss;h=a276498b21e743112020b74b3f22a6faca5eabc2;hb=HEAD;hp=6ed2106ad2c9ec906c971999c5a2c22ffdc718c0;hpb=4f895a547139e314f2ee1bfc839e69db2773cf06;p=dotfiles.git diff --git a/bin/bin/mkss b/bin/bin/mkss index 6ed2106..a276498 100755 --- a/bin/bin/mkss +++ b/bin/bin/mkss @@ -3,8 +3,17 @@ 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 -cwebpl.sh -o $tmp.webp $tmp.png -paster $tmp.webp > $tmp.txt +my-cwebpl -o $tmp.webp $tmp.png +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