From ac175c332d2d549d6120af22e150ab9c8fde04c8 Mon Sep 17 00:00:00 2001 From: NiseVoid Date: Tue, 8 Dec 2020 11:51:34 +0100 Subject: [PATCH] Use jpg for screenshots --- bin/screenie | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/bin/screenie b/bin/screenie index f44c111..21cf76b 100755 --- a/bin/screenie +++ b/bin/screenie @@ -2,25 +2,17 @@ NAME="ss-$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c${1:-32};)" -maim -m 1 -s /tmp/$NAME.png -c 1,0.25,0.25,0.6 --hidecursor -if [ $? -ne 0 ] -then - notify-send 'Screenshot canceled' -u low +maim -m 10 -s /tmp/$NAME.jpg -c 1,0.25,0.25,0.6 --hidecursor +if [ $? -ne 0 ]; then exit fi -if [ ! -e /tmp/$NAME.png ] -then - notify-send 'Screenshot failed' 'File does not exist' -u critical +if [ ! -e /tmp/$NAME.jpg ]; then exit fi -scp /tmp/$NAME.png ss:ss -if [ $? -eq 0 ] -then - echo -n 'https://ss.fuyu.moe/nisevoid/'$NAME'.png' | xclip -selection "clip-board" - notify-send 'Screenshot uploaded' -u low -else - notify-send 'Screenshot failed' 'Could not upload image' -u critical +scp /tmp/$NAME.jpg ss:ss +if [ $? -eq 0 ]; then + echo -n 'https://ss.fuyu.moe/nisevoid/'$NAME'.jpg' | xclip -selection "clip-board" fi -rm /tmp/$NAME.png +rm /tmp/$NAME.jpg