2020-01-25 20:04:14 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
file_name=$(echo ~/Pictures/Screenshots/)
|
|
|
|
base_name=$(date +%F_%H-%M-%S)
|
|
|
|
base_name+=".png"
|
|
|
|
|
|
|
|
file_name+=$base_name
|
|
|
|
|
|
|
|
flameshot gui -r > $file_name
|
|
|
|
|
2020-09-01 11:52:19 +02:00
|
|
|
sum1=$(cat $file_name | md5sum)
|
|
|
|
sum2=$(echo -e "screenshot aborted" | md5sum)
|
|
|
|
|
|
|
|
if test "$sum1" = "$sum2"; then
|
|
|
|
notify-send "Screenshot aborted" "$url" --icon=flameshot.svg
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2020-09-01 11:43:51 +02:00
|
|
|
url=$(sh $(dirname $0)/upload_file.sh $file_name)
|
2020-01-25 20:04:14 +01:00
|
|
|
|
|
|
|
echo $url | xclip -selection clipboard
|
|
|
|
|
|
|
|
notify-send "File upload complete" "$url" --icon=flameshot.svg
|