ntfy/examples/linux-desktop-notifications/notify-desktop.sh
Philipp Heckel 4d48c5dc34 Examples
2021-11-08 20:15:13 -05:00

8 lines
299 B
Bash

#!/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.
while read msg; do
[ -n "$msg" ] && notify-send "$msg"
done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw)