notify-desktop.sh 321 B

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