dotfiles/.config/fish/functions/send_push.fish

18 lines
433 B
Fish
Raw Normal View History

function send_push -a message -d 'Send a push notification to your phone via pushover (optional delay as second arg)'
if test -n "$argv[2]"; sleep $argv[2]; end
2020-08-15 23:20:08 +00:00
set payload \
"{
\"token\": \"$pushover_token\",
\"user\": \"$pushover_user\",
\"title\": \"Tasks\",
\"message\": $message
}"
curl \
-X POST \
-H 'Content-Type: application/json' \
-d $payload \
https://api.pushover.net/1/messages.json
end