Skip to content

Instantly share code, notes, and snippets.

@el22or
Forked from kloneets/screen-to-dropbox
Created October 24, 2018 10:18
Show Gist options
  • Save el22or/9e0fc7b92da70e73ceb4b7069aa5ab66 to your computer and use it in GitHub Desktop.
Save el22or/9e0fc7b92da70e73ceb4b7069aa5ab66 to your computer and use it in GitHub Desktop.
Screenshot to dropbox on linux
#!/bin/bash
# Take a screenshot of an area of the screen, upload it to dropbox and put the url into the clipboard
# Put file in any directory under your dropbox
# If it is subfolder, than you need to make them manually
FILENAME=~/Dropbox/Public/Screenshots/Screenshot_`date +%Y-%m-%d-%H:%M`.png
# Select an area and save the screenshot
# you need to instal gnome-screenshot
# on ubuntu: sudo apt install gnome-screenshot
gnome-screenshot -a -f $FILENAME
# You need to install dropbox on your linux system and log in
URL=`dropbox sharelink $FILENAME`
# you need to install xclip on your system to get link to clipboard
# on ubunut: sudo apt install xclip
echo $URL | xclip -selection clipboard
# Pop up a small notification
# You need to install notify-osd (at least on gnome-shell)
# on ubuntu-gnome: sudo apt install notify-osd
notify-send "Copied $URL to clipboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment