Created
November 18, 2018 08:02
-
-
Save vodolaz095/bf25654a50d7daf40fe1e831a81792bd to your computer and use it in GitHub Desktop.
screenshot - shell script to make and upload screenshot
This file contains hidden or 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 | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 9 | head -n 1) | |
PIC_URL=$HOME/Pictures/Screenshots/$NEW_UUID.png | |
mkdir -p $HOME/Pictures/Screenshots | |
scrot -s -c $PIC_URL | |
scp $PIC_URL holod.local:/srv/www/s/ | |
echo "View image on https://vodolaz095.life/s/$NEW_UUID.png" | |
echo "https://vodolaz095.life/s/$NEW_UUID.png" | xclip -selection clipboard | |
notify-send "View image on https://vodolaz095.life/s/$NEW_UUID.png" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment