Skip to content

Instantly share code, notes, and snippets.

@kloneets
Last active April 10, 2020 08:59
Show Gist options
  • Select an option

  • Save kloneets/51f3c5fed2c6c573e3fd9c8377033900 to your computer and use it in GitHub Desktop.

Select an option

Save kloneets/51f3c5fed2c6c573e3fd9c8377033900 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"
@jack828
Copy link
Copy Markdown

jack828 commented May 2, 2018

Very useful, thanks!

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