75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
|
{ lib, config, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.progs.aerc;
|
||
|
in
|
||
|
{
|
||
|
options.progs.aerc = {
|
||
|
enable = mkOption {
|
||
|
type = types.bool;
|
||
|
default = false;
|
||
|
description = "Add neomutt with my personal configuration";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# See: https://git.sbruder.de/simon/nixos-config/src/branch/master/users/simon/modules/mail/aerc/default.nix
|
||
|
config = mkIf cfg.enable {
|
||
|
programs.aerc = {
|
||
|
enable = true;
|
||
|
extraConfig = {
|
||
|
general.unsafe-accounts-conf = true;
|
||
|
|
||
|
filters = {
|
||
|
"text/plain" = "${./colorize}";
|
||
|
"text/html" = "html";
|
||
|
};
|
||
|
};
|
||
|
extraBinds = {
|
||
|
messages = {
|
||
|
"q" = ":quit<Enter>";
|
||
|
|
||
|
"gt" = ":next-tab<Enter>";
|
||
|
"gT" = ":prev-tab<Enter>";
|
||
|
|
||
|
"j" = ":next<Enter>";
|
||
|
"<Down>" = ":next<Enter>";
|
||
|
"<C-d>" = ":next 50%<Enter>";
|
||
|
|
||
|
"k" = ":prev<Enter>";
|
||
|
"<Up>" = ":prev<Enter>";
|
||
|
"<C-b>" = ":prev 50%<Enter>";
|
||
|
|
||
|
"gg" = ":select 0<Enter>";
|
||
|
"G" = ":select -1<Enter>";
|
||
|
|
||
|
"J" = ":next-folder<Enter>";
|
||
|
"K" = ":prev-folder<Enter>";
|
||
|
|
||
|
"<Enter>" = ":view<Enter>";
|
||
|
};
|
||
|
|
||
|
view = {
|
||
|
"q" = ":close<Enter>";
|
||
|
"O" = ":open<Enter>";
|
||
|
"S" = ":save<space>";
|
||
|
|
||
|
"f" = ":forward<Enter>";
|
||
|
|
||
|
"rr" = ":reply -a<Enter>";
|
||
|
"rq" = ":reply -aq<Enter>";
|
||
|
"Rr" = ":reply<Enter>";
|
||
|
"Rq" = ":reply -q<Enter>";
|
||
|
|
||
|
"<C-k>" = ":prev-part<Enter>";
|
||
|
"<C-j>" = ":next-part<Enter>";
|
||
|
"J" = ":next<Enter>";
|
||
|
"K" = ":prev<Enter>";
|
||
|
};
|
||
|
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|