summaryrefslogtreecommitdiffstats
path: root/upshot
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-12-03 20:48:56 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-12-03 20:49:12 +0100
commitad4e4a3f6d09324286fdf3374c3802eabc844792 (patch)
tree470b6e28ae7260d241e64b3fd949aa8036582074 /upshot
parent7ad893fdbcf0c81cfbf8bf260aa97040674a1885 (diff)
downloadbin-ad4e4a3f6d09324286fdf3374c3802eabc844792.tar.gz
bin-ad4e4a3f6d09324286fdf3374c3802eabc844792.tar.xz
upshot: Allow to force notification mode
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'upshot')
-rwxr-xr-xupshot6
1 files changed, 3 insertions, 3 deletions
diff --git a/upshot b/upshot
index 43201aa..65c841a 100755
--- a/upshot
+++ b/upshot
@@ -5,11 +5,11 @@ set -e
file=$(mktemp --tmpdir screenshot-XXXX.png)
maim -s "$file"
#gimp "$file"
-if tty &>/dev/null; then
+if tty &>/dev/null && ! [[ $1 = "-n" ]]; then
fb "$file"
else
#urxvt -geometry 79x1 -e
- systemd-cat fb "$file"
- notify-send -t 5000 "Screenshot upload complete"
+ output=$(fb "$file")
+ notify-send -t 5000 "Screenshot upload complete: $output"
fi
rm "$file"