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
|
#!/bin/bash
|
||||||
num=$(find ~/.local/share/mail/*/INBOX/new -type f | wc -l)
|
num=$(find ~/.local/share/mail/*/INBOX/new -type f | wc -l)
|
||||||
if [ $num != 0 ]; then
|
[ $num != 0 ] && printf "📬%s" "$num"
|
||||||
echo "📬"$num
|
printf '\n'
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
newsboat -x reload
|
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=$( 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