diff options
Diffstat (limited to 'modules/communication/neomutt/account')
| -rw-r--r-- | modules/communication/neomutt/account/default.nix | 1 | ||||
| -rw-r--r-- | modules/communication/neomutt/account/sync-channel.nix | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/modules/communication/neomutt/account/default.nix b/modules/communication/neomutt/account/default.nix index f0b1cb1..6eec24e 100644 --- a/modules/communication/neomutt/account/default.nix +++ b/modules/communication/neomutt/account/default.nix @@ -7,6 +7,7 @@ imports = [ ./options.nix ./flavors/gmail.nix + ./sync-channel.nix ]; } ); 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>" + ''; + }; +} |
