1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-24 02:32:48 +01:00
ntfy/examples/linux-desktop-notifications/notify-desktop.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
321 B
Bash
Raw Normal View History

#!/bin/bash
# This is an example shell script showing how to consume a ntfy.sh topic using
# a simple script. The notify-send command sends any arriving message as a desktop notification.
2021-11-29 21:34:29 +01:00
TOPIC_URL=ntfy.sh/mytopic
while read msg; do
[ -n "$msg" ] && notify-send "$msg"
2021-11-29 21:34:29 +01:00
done < <(stdbuf -i0 -o0 curl -s $TOPIC_URL/raw)