only show new mail if in inbox

This commit is contained in:
Noah Masur 2023-04-15 10:08:45 -04:00
parent cf73ce8136
commit ca7a4ed408

View File

@ -107,7 +107,7 @@
format = "<label>"; format = "<label>";
exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" '' exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" ''
${pkgs.notmuch}/bin/notmuch new > /dev/null ${pkgs.notmuch}/bin/notmuch new > /dev/null
UNREAD=$(${pkgs.notmuch}/bin/notmuch count is:inbox and is:unread) UNREAD=$(${pkgs.notmuch}/bin/notmuch count is:inbox and is:unread and folder:main/Inbox)
if [ $UNREAD = "0" ]; then if [ $UNREAD = "0" ]; then
echo "" echo ""
else else