example_desktop_notifications.sh 299 B

1234567
  1. #!/bin/bash
  2. # This is an example shell script showing how to consume a ntfy.sh topic using
  3. # a simple script. The notify-send command sends any arriving message as a desktop notification.
  4. while read msg; do
  5. [ -n "$msg" ] && notify-send "$msg"
  6. done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw)