Use jpg for screenshots
This commit is contained in:
parent
3676e4e447
commit
ac175c332d
22
bin/screenie
22
bin/screenie
@ -2,25 +2,17 @@
|
|||||||
|
|
||||||
NAME="ss-$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c${1:-32};)"
|
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
|
maim -m 10 -s /tmp/$NAME.jpg -c 1,0.25,0.25,0.6 --hidecursor
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]; then
|
||||||
then
|
|
||||||
notify-send 'Screenshot canceled' -u low
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e /tmp/$NAME.png ]
|
if [ ! -e /tmp/$NAME.jpg ]; then
|
||||||
then
|
|
||||||
notify-send 'Screenshot failed' 'File does <u>not</u> exist' -u critical
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scp /tmp/$NAME.png ss:ss
|
scp /tmp/$NAME.jpg ss:ss
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]; then
|
||||||
then
|
echo -n 'https://ss.fuyu.moe/nisevoid/'$NAME'.jpg' | xclip -selection "clip-board"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
rm /tmp/$NAME.png
|
rm /tmp/$NAME.jpg
|
||||||
|
Loading…
Reference in New Issue
Block a user