send-notification 525 B

123456789101112131415161718
  1. #!/bin/sh
  2. if [ $# -eq 2 ] ; then
  3. notify-send "${1}" "${2}"
  4. curl -s \
  5. -F "token=acioo737xpg83udi17sdsevmjox5eg" \
  6. -F "user=u4wih2x18os74469f6zj9jggd7mbon" \
  7. -F "message=\"$2\"" \
  8. -F "title=\"$1\"" \
  9. https://api.pushover.net/1/messages.json
  10. else
  11. notify-send "${1}"
  12. curl -s \
  13. -F "token=acioo737xpg83udi17sdsevmjox5eg" \
  14. -F "user=u4wih2x18os74469f6zj9jggd7mbon" \
  15. -F "message=\"$1\"" \
  16. https://api.pushover.net/1/messages.json
  17. fi