diff --git a/.local/bin/statusbar/news b/.local/bin/statusbar/news index 96723ae..56a0939 100755 --- a/.local/bin/statusbar/news +++ b/.local/bin/statusbar/news @@ -1,4 +1,6 @@ #!/bin/bash -num=$( cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)") -[ "$num" = "" ] || printf "📰%s" "$num" -printf '\n' +num="$(newsboat -x print-unread | cut -f1 -d ' ' )" +if ! pgrep newsboat > /dev/null ; then + [ "$num" = "" ] || printf "📰%s" "$num" + printf '\n' +fi