From 187b8f271e9b4b52eb72639c1fc4c92c01411641 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 29 Sep 2023 12:37:58 +0100 Subject: [PATCH] imapnotify only send notification on new mail --- home/accounts/email.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/home/accounts/email.nix b/home/accounts/email.nix index 6e1f54ed..f8ef5dc1 100644 --- a/home/accounts/email.nix +++ b/home/accounts/email.nix @@ -40,8 +40,10 @@ enable = true; boxes = [ "INBOX" ]; onNotify = "${pkgs.isync}/bin/mbsync --pull proton:INBOX"; - onNotifyPost = - "${pkgs.libnotify}/bin/notify-send 'Proton: New mail arrived'"; + onNotifyPost = { + mail = + "${pkgs.libnotify}/bin/notify-send 'Proton: New mail arrived'"; + }; extraConfig = { tls = false; tlsOptions.rejectUnauthorized = false; @@ -78,8 +80,10 @@ enable = true; boxes = [ "INBOX" ]; onNotify = "${pkgs.isync}/bin/mbsync --pull icloud:INBOX"; - onNotifyPost = - "${pkgs.libnotify}/bin/notify-send 'iCloud: New mail arrived'"; + onNotifyPost = { + mail = + "${pkgs.libnotify}/bin/notify-send 'Proton: New mail arrived'"; + }; }; mbsync = { enable = true; @@ -115,8 +119,10 @@ enable = true; boxes = [ "INBOX" ]; onNotify = "${pkgs.isync}/bin/mbsync --pull ukaea:INBOX"; - onNotifyPost = - "${pkgs.libnotify}/bin/notify-send 'UKAEA: New mail arrived'"; + onNotifyPost = { + mail = + "${pkgs.libnotify}/bin/notify-send 'Proton: New mail arrived'"; + }; extraConfig = { tls = false; tlsOptions.rejectUnauthorized = false;