aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication/neomutt/account/sync-channel.nix
blob: 5af74438a61d2d6a92f8bfe8c20030f41619fc96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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>"
      '';
  };
}