summaryrefslogtreecommitdiffstats
path: root/upshot
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-06-29 11:58:25 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-06-29 11:58:25 +0200
commit1df5ce85ba736f9844cfdabfec9167c3d424c33b (patch)
tree172d4e14c81320c137d9cc1d9aca193984fee112 /upshot
parentea7435d35d6813ba078b5e2bb46b08db54c591da (diff)
downloadbin-1df5ce85ba736f9844cfdabfec9167c3d424c33b.tar.gz
bin-1df5ce85ba736f9844cfdabfec9167c3d424c33b.tar.xz
upshot: Use maim, send notification, don't open a terminal
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'upshot')
-rwxr-xr-xupshot12
1 files changed, 8 insertions, 4 deletions
diff --git a/upshot b/upshot
index ff45c51..43201aa 100755
--- a/upshot
+++ b/upshot
@@ -1,11 +1,15 @@
-#!/bin/sh
-#file=$(scrot -sb -e 'echo $f')
+#!/bin/bash
+
+set -e
+
file=$(mktemp --tmpdir screenshot-XXXX.png)
-maim -s $file
+maim -s "$file"
#gimp "$file"
if tty &>/dev/null; then
fb "$file"
else
- urxvt -geometry 79x1 -e fb "$file"
+ #urxvt -geometry 79x1 -e
+ systemd-cat fb "$file"
+ notify-send -t 5000 "Screenshot upload complete"
fi
rm "$file"