only prints new articles if newsboat is closed

This commit is contained in:
Alexander Bocken 2020-12-19 16:04:51 +01:00
parent 342a334cdf
commit 998ee399e5
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -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