summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xupshot10
1 files changed, 8 insertions, 2 deletions
diff --git a/upshot b/upshot
index 65c841a..7a4aa92 100755
--- a/upshot
+++ b/upshot
@@ -2,9 +2,16 @@
set -e
-file=$(mktemp --tmpdir screenshot-XXXX.png)
+dir=$(mktemp --tmpdir -d)
+trap "rm -rf '$dir'" EXIT INT TERM
+
+file=$(mktemp --tmpdir="$dir" screenshot-XXXX.png)
maim -s "$file"
+#flameshot gui -r > "$file"
#gimp "$file"
+
+notify-send -t 5000 "Screenshot uploading"
+
if tty &>/dev/null && ! [[ $1 = "-n" ]]; then
fb "$file"
else
@@ -12,4 +19,3 @@ else
output=$(fb "$file")
notify-send -t 5000 "Screenshot upload complete: $output"
fi
-rm "$file"