From 56f5701af72fcb858b33c697755034d22d8502aa Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Wed, 6 Jan 2021 16:13:30 +0100 Subject: [PATCH] Don't notify on 0 emails --- configurations/mail.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configurations/mail.nix b/configurations/mail.nix index b4e63de3..47a5c818 100644 --- a/configurations/mail.nix +++ b/configurations/mail.nix @@ -7,7 +7,8 @@ let if [ "$unseen_count" = "1" ] then ${pkgs.libnotify}/bin/notify-send -t 5000 'New ${name} mail arrived' "1 unseen mail" - else + elif [ "$unseen_count" != "0" ] + then ${pkgs.libnotify}/bin/notify-send -t 5000 'New ${name} mail arrived' "$unseen_count unseen mails" fi '';