mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-10-16 14:27:34 +00:00
14 lines
306 B
Fish
14 lines
306 B
Fish
which ntfy --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
|