-
-
Save el22or/9e0fc7b92da70e73ceb4b7069aa5ab66 to your computer and use it in GitHub Desktop.
Screenshot to dropbox on linux
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/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