print newline if zero for news and mailcount via printf
This commit is contained in:
parent
7edeec270d
commit
bc32fcc81f
@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
num=$(find ~/.local/share/mail/*/INBOX/new -type f | wc -l)
|
||||
if [ $num != 0 ]; then
|
||||
echo "📬"$num
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
[ $num != 0 ] && printf "📬%s" "$num"
|
||||
printf '\n'
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
newsboat -x reload
|
||||
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" = "" ] || echo 📰$num
|
||||
[ "$num" = "" ] || printf "📰%s" "$num"
|
||||
printf '\n'
|
||||
|
Loading…
Reference in New Issue
Block a user