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