Skip to content

Instantly share code, notes, and snippets.

@koenhendriks
Last active September 21, 2016 09:56
Show Gist options
  • Save koenhendriks/727e90e338e0d332dc2c0527e3710222 to your computer and use it in GitHub Desktop.
Save koenhendriks/727e90e338e0d332dc2c0527e3710222 to your computer and use it in GitHub Desktop.
Screenshot and upload script
!/bin/sh
FILE="$(date +%F_%H-%M-%S)-scrot.png"
gnome-screenshot -f $FILE -a && ~/Documents/screenshot.sh ~/$FILE | xclip -selection clipboard && mv ~/$FILE ~/shots/
#!/bin/sh
downpomf=""
uppomf="https://up.serioushomebrew.nl/upload.php"
if test $# -lt 1 ; then
echo "Usage: `basename $0` FILE [FILE...]"
exit 1
fi
set=
for f ; do
test "$set" || set -- ; set=1
set -- "$@" -F "files[]=@$f"
done
curl -fsSL "$@" "$uppomf" | jq -c -r --arg base "$downpomf" '$base + .files[].url'
#!/bin/sh
scrot '%Y-%m-%d_%H-%M_scrot.png' --select --exec '~/Documents/screenshot.sh $f | xclip -selection clipboard && mv $f ~/shots/'
@koenhendriks
Copy link
Author

koenhendriks commented Sep 21, 2016

put screenshot.sh in ~/Documents/ and launch shot.sh for scrot or gnomeShot.sh for use with gnome-screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment