#!/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 -u low -c transfer.complete "Upload completed" else notify -u normal -c transfer.error "Upload failed" end end rm "$f" end