Created
September 3, 2017 12:53
-
-
Save McKean/295af22d11abfdffeed6eea323f60681 to your computer and use it in GitHub Desktop.
take screenshots and upload them to Dropbox with a share link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Run this and it will take a screenshot and upload it to dropbox | |
# scrot and dropbox_uploader need to be installed | |
shotsdir=$HOME/Pictures/screenshots | |
uploaddir=/Public/screenshots | |
filename="shot-`date +%Y-%m-%d-%H-%M-%S`.png" | |
file="$shotsdir/$filename" | |
case "$1" in | |
-d|$NULL) | |
scrot $* $file | |
;; | |
-w) | |
scrot -u $* $file | |
;; | |
-s) | |
notify-send 'select an area for the screenshot' & | |
scrot -s $* $file | |
;; | |
esac | |
dropbox_uploader upload $file $uploaddir | |
dropbox_uploader share $uploaddir/$filename | egrep -o 'https?://[^ ]+' | xclip -i -selection clipboard | |
notify-send "screenshot has been saved in $shotsdir and can be pasted" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment