Created
February 23, 2019 03:24
-
-
Save VOID001/eef3e9358286380a470b16a72c810452 to your computer and use it in GitHub Desktop.
Take screenshot, upload to pastebin and put the URL into your clipboard
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 | |
/usr/bin/flameshot gui | |
/usr/bin/notify-send "Taking Screenshot" "Please wait..." --icon=dialog-information | |
dbus-monitor --profile "type=signal,interface=org.dharkael.Flameshot,member=captureTaken" | | |
while read -r line; do | |
if [[ $line == *"captureTaken"* ]]; then | |
URL=$(/usr/bin/xclip -selection clipboard -t image/png -o > /tmp/shot.png && /usr/bin/curl -F 'name=@/tmp/shot.png' https://img.vim-cn.com/) | |
echo "$URL" | xclip -in -sel clipboard | |
/usr/bin/notify-send "Screenshot Uploaded" "$URL" --icon=dialog-information | |
pkill -P $$ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment