diff options
author | Pacien TRAN-GIRARD | 2016-03-07 12:48:02 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-03-07 12:48:02 +0100 |
commit | f485a9a5d1f7889ac6e78c6eb11962725c457f8c (patch) | |
tree | 55709a998f44c6c61c62d1fa2fbd4ea6d386f871 | |
parent | 649757fde2d8874e9544be2ac1deefde27215b18 (diff) | |
download | desktop-utilities-f485a9a5d1f7889ac6e78c6eb11962725c457f8c.tar.gz |
Add screenshot upload state notification
-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 | ||