Fix calculation of unseen mails

This commit is contained in:
Charlotte Van Petegem 2022-07-10 20:21:32 +02:00
parent 5a6d1f6799
commit 0b328b9c69
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -3,7 +3,7 @@
let
passwordScript = pkgs.writeShellScript "get_mail_password" ''${pkgs.pass}/bin/pass show "$@" | ${pkgs.coreutils}/bin/head -n1 | ${pkgs.coreutils}/bin/tr -d "\n"'';
notifyScript = name: pkgs.writeShellScript "notify_${name}_mail" ''
unseen_count=$(${pkgs.mblaze}/bin/mlist -N ~/mail/*/INBOX | wc -l)
unseen_count=$(${pkgs.mblaze}/bin/mlist -N ~/mail/*/INBOX | ${pkgs.coreutils}/bin/wc -l)
if [ "$unseen_count" = "1" ]
then