diff options
-rwxr-xr-x | post-screenshot.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/post-screenshot.sh b/post-screenshot.sh index df8acf2..5a4b478 100755 --- a/post-screenshot.sh +++ b/post-screenshot.sh | |||
@@ -12,5 +12,13 @@ FILE="$LOCAL_DIR/$FILE_NAME" | |||
12 | 12 | ||
13 | scrot "$FILE" -s | 13 | scrot "$FILE" -s |
14 | viewnior "$FILE" & | 14 | viewnior "$FILE" & |
15 | scp "$FILE" "$REMOTE_DIR/" & | 15 | |
16 | echo -n "$BASE_URL/$FILE_NAME" | xclip -i | 16 | scp "$FILE" "$REMOTE_DIR/" |
17 | |||
18 | if [ $? -eq 0 ]; then | ||
19 | SCREENSHOT_URL="$BASE_URL/$FILE_NAME" | ||
20 | notify-send --category=transfer.complete "Screenshot upload complete." "$SCREENSHOT_URL" | ||
21 | echo -n "$SCREENSHOT_URL" | xclip -i | ||
22 | else | ||
23 | notify-send --category=transfer.error "Screenshot upload failed." | ||
24 | fi | ||