only prints new articles if newsboat is closed
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user