aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication/neomutt/account/sync-channel.nix
diff options
context:
space:
mode:
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>"
+ '';
+ };
+}