For some reasons I'm forced to upload screenshots to S3 instead of public resourses. This paper describes simple solution which allows to upload screenshots and get link to it directly from screenshot tool.
Create desktop file in
$HOME/.local/share/applications/s3cmd.desktop with the
[Desktop Entry] Name=s3cmd Exec=s3cmd put --acl-public %U "s3://bucket-name/path/to/screenshots/`uuidgen`.png" | grep "Public URL" | cut -d ':' -f 2- | xsel -bi Icon=image Type=Application Terminal=true Categories=Graphics; MimeType=image/png;
The magic is in
Exec= parameter. It uses path to temporary created file (
uploads image to S3 by using
s3cmd and gets URL from it with some bash magic.
Just do screenshot and open it with