do not display "Error" when newsboat is reloading

This commit is contained in:
Alexander Bocken 2021-05-12 14:57:44 +02:00
parent 195a5ec9b6
commit 83f6e0960f
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
num="$(newsboat -x print-unread | cut -f1 -d ' ' )" num="$(newsboat -x print-unread | cut -f1 -d ' ' )"
if ! pgrep newsboat > /dev/null ; then if ! pgrep newsboat > /dev/null ; then
[ "$num" = "0" ] || printf "📰%s" "$num" [ "$num" -gt 0 ] 2>/dev/null && printf "📰%s" "$num"
printf '\n' printf '\n'
fi fi