2021-03-30 20:59:59 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
s3_bucket=public.serguzim.me/screenshots
|
|
|
|
s3_host=https://sos-de-fra-1.exo.io
|
|
|
|
path=/tmp/screenshot.png
|
|
|
|
|
|
|
|
if flameshot gui -r > $path
|
|
|
|
then
|
|
|
|
file=$(date "+%F_%H-%M-%S").png
|
|
|
|
|
|
|
|
xclip -t image/png $path -selection clipboard
|
|
|
|
|
|
|
|
s3cmd put -P $path s3://$s3_bucket/$file
|
2021-04-01 17:00:33 +00:00
|
|
|
echo -n "$s3_host/$s3_bucket/$file" | xclip -selection primary
|
|
|
|
|
|
|
|
notify-send -a "Screenshot" "Uploaded screenshot to s3"
|
2021-03-30 20:59:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|