sharenix: add more notifications

master
an 2019-06-18 09:20:27 -04:00
parent 8a0039cc17
commit 3c43022d21
1 changed files with 8 additions and 1 deletions

View File

@ -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