sharenix: add more notifications
parent
8a0039cc17
commit
3c43022d21
|
@ -1,13 +1,20 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
function notify
|
||||||
|
notify-send -a sharenix -i dialog-information $argv
|
||||||
|
end
|
||||||
|
|
||||||
function run_spectacle
|
function run_spectacle
|
||||||
set f "$HOME/Pictures/"(date "+%y%m%d-%H%M%S")".png"
|
set f "$HOME/Pictures/"(date "+%y%m%d-%H%M%S")".png"
|
||||||
|
|
||||||
spectacle -b $argv -n -o "$f"
|
spectacle -b $argv -n -o "$f"
|
||||||
|
|
||||||
if test -f "$f"
|
if test -f "$f"
|
||||||
|
notify -u low -c transfer "Uploading..."
|
||||||
if sharenix -s Greyserv "$f"
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue