nixos-config/user/neomutt/default.nix

108 lines
2 KiB
Nix
Raw Normal View History

2023-02-16 12:07:46 -03:00
{ pkgs, lib, ... }:
let
inherit (pkgs.uservars) key;
inherit (lib) toUpper;
in
{
programs.neomutt.enable = true;
programs.neomutt.binds = [
{
map = [ "index" ];
key = key.left;
action = "noop";
}
{
map = [ "index" ];
key = key.down;
action = "next-entry";
}
{
map = [ "index" ];
key = key.up;
action = "previous-entry";
}
{
map = [ "index" ];
key = key.right;
action = "display-message";
}
{
map = [ "attach" ];
key = key.up;
action = "previous-entry";
}
{
map = [ "attach" ];
key = key.down;
action = "next-entry";
}
{
map = [ "attach" ];
key = key.left;
action = "exit";
}
{
map = [ "attach" ];
key = key.right;
action = "view-mailcap";
}
{
map = [ "pager" ];
key = key.left;
action = "exit";
}
{
map = [ "pager" ];
key = key.down;
action = "next-line";
}
{
map = [ "pager" ];
key = key.up;
action = "previous-line";
}
{
map = [ "pager" ];
key = key.right;
action = "view-attachments";
}
{
map = [ "index" "pager" "browser" ];
key = toUpper key.up;
action = "half-up";
}
{
map = [ "index" "pager" "browser" ];
key = toUpper key.down;
action = "half-down";
}
{
map = [ "browser" ];
key = key.left;
action = "goto-parent";
}
{
map = [ "index" "pager" ];
key = "\\C${ key.down }";
action = "sidebar-next";
}
{
map = [ "index" "pager" ];
key = "\\C${ key.up }";
action = "sidebar-prev";
}
{
map = [ "index" "pager" ];
key = "\\C${ key.right }";
action = "sidebar-open";
}
{
map = [ "index" "pager" ];
key = "\\C${ key.left }";
action = "sidebar-toggle-visible";
}
];
programs.neomutt.extraConfig = lib.readFile ./neomuttrc;
}