summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-07-24 10:44:23 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-07-24 10:44:23 +0200
commitac82514e9ac44afd002cae52e91220f6598aaa1f (patch)
treeb1809d6e2fd148c1294307ba5998cb4f1b7f953c
parent8a819ef6c225cb84579547e935bf485b939cc0db (diff)
downloadbin-ac82514e9ac44afd002cae52e91220f6598aaa1f.tar.gz
bin-ac82514e9ac44afd002cae52e91220f6598aaa1f.tar.xz
upshot: add flameshot comment
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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"