aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication/neomutt/account/sync-channel.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar@gmail.com>2026-09-18 03:44:23 +0530
committerArpit Chakladar <arpitchakladar@gmail.com>2026-09-18 03:47:06 +0530
commit18767458ee09322d99c8a799c6733dcac6b35683 (patch)
treed49f8aa43d6713a80d9f74598e09fc29d824706d /modules/communication/neomutt/account/sync-channel.nix
parentd87a209b9efd2e32827aca20c66af7f94ce9e6c1 (diff)
downloadhome-manager-config-18767458ee09322d99c8a799c6733dcac6b35683.tar.gz
home-manager-config-18767458ee09322d99c8a799c6733dcac6b35683.zip
feat(communication/neomutt): added macros to sync channels
Diffstat (limited to 'modules/communication/neomutt/account/sync-channel.nix')
-rw-r--r--modules/communication/neomutt/account/sync-channel.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/communication/neomutt/account/sync-channel.nix b/modules/communication/neomutt/account/sync-channel.nix
new file mode 100644
index 0000000..5af7443
--- /dev/null
+++ b/modules/communication/neomutt/account/sync-channel.nix
@@ -0,0 +1,18 @@
+{
+ config,
+ lib,
+ name,
+ ...
+}@inputs:
+{
+ config = lib.mkIf config.enable {
+ neomutt.extraConfig =
+ let
+ mbsyncNames = (import ../lib.nix inputs).mbsyncNamesFromName name;
+ in
+ ''
+ macro index,pager gs "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>neomutt-sync ${mbsyncNames.channels.quick}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>"
+ macro index,pager gS "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>neomutt-sync ${mbsyncNames.channels.full}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>"
+ '';
+ };
+}