diff --git a/home-manager-modules/mails/default.nix b/home-manager-modules/mails/default.nix
index 6a66024..f12fba7 100644
--- a/home-manager-modules/mails/default.nix
+++ b/home-manager-modules/mails/default.nix
@@ -132,13 +132,19 @@ with lib;
#julien.malka@telecom-paris.fr
- notmuch tag +telecom-inbox path:telecom/Inbox/**
+ notmuch tag +telecom-inbox -- folder:telecom/Inbox
+ notmuch tag +telecom-gdr-gpl -- folder:telecom/Inbox/gdr-gpl
+ notmuch tag +telecom-gdr-sec -- folder:telecom/Inbox/gdr-sec
+ notmuch tag +telecom-infres-tous -- folder:telecom/Inbox/infres-tous
+ notmuch tag +telecom-tous -- folder:telecom/Inbox/telecom-tous
#luj@dgnum.eu
notmuch tag +dgnum-inbox path:dgnum/Inbox/**
notmuch tag +dgnum-bureau -dgnum-inbox -- path:dgnum/Inbox/Bureau/**
notmuch tag +dgnum-nixcon -dgnum-inbox -- path:dgnum/Inbox/NixCon/**
+ ${pkgs.notifymuch}/bin/notifymuch
+
'';
};
@@ -150,6 +156,7 @@ with lib;
"neomutt/work.profile".source = lib.mkForce ./work.profile;
"neomutt/discourse.profile".source = lib.mkForce ./discourse.profile;
"neomutt/dgnum.profile".source = lib.mkForce ./dgnum.profile;
+ "notifymuch/notifymuch.cfg".source = lib.mkForce ./notifymuch;
};
diff --git a/home-manager-modules/mails/neomuttrc b/home-manager-modules/mails/neomuttrc
index 729f93c..fcd1926 100644
--- a/home-manager-modules/mails/neomuttrc
+++ b/home-manager-modules/mails/neomuttrc
@@ -45,6 +45,10 @@ virtual-mailboxes "kfet" "notmuch://?query=tag:ens-kfet
named-mailboxes "---telecom---" =sep3
virtual-mailboxes "inbox" "notmuch://?query=tag:telecom-inbox
+virtual-mailboxes "gdr-gpl" "notmuch://?query=tag:telecom-gdr-gpl
+virtual-mailboxes "gdr-sec" "notmuch://?query=tag:telecom-gdr-sec
+virtual-mailboxes "tous" "notmuch://?query=tag:telecom-tous
+virtual-mailboxes "infres-tous" "notmuch://?query=tag:telecom-infres-tous
named-mailboxes "----dgnum----" =sep4
virtual-mailboxes "inbox" "notmuch://?query=tag:dgnum-inbox
@@ -92,6 +96,10 @@ folder-hook "ens-dg" 'source ~/.config/neomutt/ens.profile'
folder-hook "ens-kfet" 'source ~/.config/neomutt/ens.profile'
folder-hook "telecom-inbox" 'source ~/.config/neomutt/telecom.profile'
+folder-hook "telecom-gdr-gpl" 'source ~/.config/neomutt/telecom.profile'
+folder-hook "telecom-gdr-sec" 'source ~/.config/neomutt/telecom.profile'
+folder-hook "telecom-infres-tous" 'source ~/.config/neomutt/telecom.profile'
+folder-hook "telecom-tous" 'source ~/.config/neomutt/telecom.profile'
folder-hook "work-nixos-discourse" 'source ~/.config/neomutt/discourse.profile'
folder-hook "work-dn42" 'source ~/.config/neomutt/work.profile'
diff --git a/home-manager-modules/mails/notifymuch b/home-manager-modules/mails/notifymuch
new file mode 100644
index 0000000..428a2a8
--- /dev/null
+++ b/home-manager-modules/mails/notifymuch
@@ -0,0 +1,6 @@
+[notifymuch]
+query = is:unread and (tag:work-inbox or tag:ens-inbox or tag:telecom-inbox or tag:dgnum-inbox or tag:dgnum-bureau)
+mail_client = kitty -x neomutt -y
+recency_interval_hours = 48
+hidden_tags = inbox unread attachment replied sent encrypted signed
+
diff --git a/home-manager-modules/waybar/default.nix b/home-manager-modules/waybar/default.nix
index 02e7482..fbc273d 100644
--- a/home-manager-modules/waybar/default.nix
+++ b/home-manager-modules/waybar/default.nix
@@ -20,7 +20,7 @@ with lib;
layer = "top";
modules-left = [ "custom/nixos" "sway/workspaces" ];
modules-center = [ "clock" ];
- modules-right = [ "network" "battery" ];
+ modules-right = [ "custom/mails" "network" "battery" ];
"custom/nixos" = {
format = " ❄ ";
tooltip = false;
@@ -67,6 +67,11 @@ with lib;
format-charging = " {capacity}%";
tooltip = false;
};
+ "custom/mails" = {
+ format = " {}";
+ exec = "${pkgs.notmuch}/bin/notmuch count 'tag:unread and (tag:dgnum-inbox or tag:ens-inbox or tag:work-inbox or tag:telecom-inbox or tag:dgnum-bureau)'";
+ interval = 10;
+ };
};
};
style = ''
@@ -114,7 +119,7 @@ with lib;
color: #cba6f7;
}
- #clock, #backlight, #pulseaudio, #bluetooth, #network, #battery{
+ #clock, #backlight, #pulseaudio, #bluetooth, #network, #battery, #custom-mails{
border-radius: 10px;
background-color: #11111b;
color: #cdd6f4;