1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-10-16 14:27:34 +00:00
config-fish/functions/ntfy.fish
2024-09-19 04:30:36 +02:00

14 lines
306 B
Fish

which curl --skip-functions >/dev/null 2>/dev/null
if [ $status -eq 0 ]
function ntfy
set topic $argv[1]
set data $argv[2..-1]
log-t "Sending notification to" "$topic" "..."
curl \
"https://ntfy.steffo.eu/$topic" \
--header "Authorization: Bearer $NTFY_TOKEN" \
--data "$data"
end
end