From 3c43022d21795478ceb9657f4314d68b35fa4211 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Tue, 18 Jun 2019 09:20:27 -0400 Subject: [PATCH] sharenix: add more notifications --- scripts/sharenix.fish | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/sharenix.fish b/scripts/sharenix.fish index 59992b7..94c6c88 100755 --- a/scripts/sharenix.fish +++ b/scripts/sharenix.fish @@ -1,13 +1,20 @@ #!/usr/bin/env fish +function notify + notify-send -a sharenix -i dialog-information $argv +end + function run_spectacle set f "$HOME/Pictures/"(date "+%y%m%d-%H%M%S")".png" spectacle -b $argv -n -o "$f" if test -f "$f" + notify -u low -c transfer "Uploading..." if sharenix -s Greyserv "$f" - notify-send -u low -a sharenix -i dialog-information -c transfer.complete "Upload completed" + notify -u low -c transfer.complete "Upload completed" + else + notify -u normal -c transfer.error "Upload failed" end end