summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-03-07 12:48:02 +0100
committerPacien TRAN-GIRARD2016-03-07 12:48:02 +0100
commitf485a9a5d1f7889ac6e78c6eb11962725c457f8c (patch)
tree55709a998f44c6c61c62d1fa2fbd4ea6d386f871
parent649757fde2d8874e9544be2ac1deefde27215b18 (diff)
downloaddesktop-utilities-f485a9a5d1f7889ac6e78c6eb11962725c457f8c.tar.gz
Add screenshot upload state notification
-rwxr-xr-xpost-screenshot.sh12
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
13scrot "$FILE" -s 13scrot "$FILE" -s
14viewnior "$FILE" & 14viewnior "$FILE" &
15scp "$FILE" "$REMOTE_DIR/" & 15
16echo -n "$BASE_URL/$FILE_NAME" | xclip -i 16scp "$FILE" "$REMOTE_DIR/"
17
18if [ $? -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
22else
23 notify-send --category=transfer.error "Screenshot upload failed."
24fi