From: Sergey Matveev Date: Thu, 16 Mar 2023 15:11:12 +0000 (+0300) Subject: Ability to screenshot without uploading X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=eae7b3bbc015f6752e575139c8c3652ad568d754 Ability to screenshot without uploading --- diff --git a/bin/bin/mkss b/bin/bin/mkss index dfe03a3..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 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