Initial commit

This commit is contained in:
Nise Void 2020-05-14 20:03:55 +02:00
commit 153479352c
Signed by: NiseVoid
GPG key ID: FBA14AC83EA602F3
18 changed files with 3402 additions and 0 deletions

26
bin/screenie Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
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
exit
fi
if [ ! -e /tmp/$NAME.png ]
then
notify-send 'Screenshot failed' 'File does <u>not</u> exist' -u critical
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
fi
rm /tmp/$NAME.png