Просмотр исходного кода

Update example_desktop_notifications.sh

Philipp C. Heckel 4 лет назад
Родитель
Сommit
17839e634c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/example_desktop_notifications.sh

+ 1 - 1
examples/example_desktop_notifications.sh

@@ -3,5 +3,5 @@
 # a simple script. The notify-send command sends any arriving message as a desktop notification.
 
 while read msg; do
-  notify-send "$msg"
+  [ -n "$msg" ] && notify-send "$msg"
 done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw)