summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-12-02 19:40:49 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-12-02 19:40:49 +0100
commit5fcf0a6b8e48fc95c8f890fe1dee2429960067fa (patch)
treee7780aff1e0926c4041883d78e65e4234dd9e87d
parentc23d10167a1db1243e4d090de7248de379aa2b73 (diff)
downloadbin-5fcf0a6b8e48fc95c8f890fe1dee2429960067fa.tar.gz
bin-5fcf0a6b8e48fc95c8f890fe1dee2429960067fa.tar.xz
upshot: use maim instead of scrot
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xupshot10
-rwxr-xr-xupshot-xbindkeys5
2 files changed, 9 insertions, 6 deletions
diff --git a/upshot b/upshot
index 15b1cd3..ff45c51 100755
--- a/upshot
+++ b/upshot
@@ -1,5 +1,11 @@
#!/bin/sh
-file=$(scrot -sb -e 'echo $f')
+#file=$(scrot -sb -e 'echo $f')
+file=$(mktemp --tmpdir screenshot-XXXX.png)
+maim -s $file
#gimp "$file"
-fb "$file"
+if tty &>/dev/null; then
+ fb "$file"
+else
+ urxvt -geometry 79x1 -e fb "$file"
+fi
rm "$file"
diff --git a/upshot-xbindkeys b/upshot-xbindkeys
index 074a7be..66bd84f 100755
--- a/upshot-xbindkeys
+++ b/upshot-xbindkeys
@@ -1,6 +1,3 @@
#!/bin/sh
sleep 0.1
-file=$(scrot -sb -e 'echo $f')
-#gimp "$file"
-urxvt -geometry 79x1 -e fb "$file"
-rm "$file"
+upshot