nix/home/email/neomutt/keybind.nix

316 lines
5.5 KiB
Nix

{ pkgs, ... }:
{
binds = [
{
map = [ "attach" ];
key = "<return>";
action = "view-mailcap";
}
{
map = [ "attach" ];
key = "l";
action = "view-mailcap";
}
# {
# map = [ "attach" ];
# key = "O";
# action = "<enter-command>unset wait_key<enter><shell-escape>rm -f /tmp/mutt-attach<enter><save-entry><kill-line>/tmp/mutt-attach<enter>^A";
# }
{
map = [ "editor" ];
key = "<space>";
action = "noop";
}
{
map = [ "pager" ];
key = "c";
action = "imap-fetch-mail";
}
{
map = [ "index" ];
key = "G";
action = "last-entry";
}
{
map = [ "index" ];
key = "g";
action = "noop";
}
{
map = [ "index" ];
key = "gg";
action = "first-entry";
}
{
map = [
"pager"
"attach"
];
key = "h";
action = "exit";
}
{
map = [ "pager" ];
key = "j";
action = "next-line";
}
{
map = [ "pager" ];
key = "k";
action = "previous-line";
}
{
map = [ "pager" ];
key = "l";
action = "view-attachments";
}
{
map = [ "index" ];
key = "D";
action = "delete-message";
}
{
map = [ "index" ];
key = "U";
action = "undelete-message";
}
{
map = [ "index" ];
key = "L";
action = "limit";
}
{
map = [ "index" ];
key = "h";
action = "noop";
}
{
map = [
"browser"
"pager"
"index"
];
key = "n";
action = "search-next";
}
{
map = [
"browser"
"pager"
"index"
];
key = "N";
action = "search-opposite";
}
{
map = [ "index" ];
key = "l";
action = "display-message";
}
{
map = [ "browser" ];
key = "h";
action = "goto-parent";
}
{
map = [ "browser" ];
key = "l";
action = "select-entry";
}
{
map = [
"pager"
"browser"
];
key = "gg";
action = "top-page";
}
{
map = [
"pager"
"browser"
];
key = "G";
action = "bottom-page";
}
{
map = [
"index"
"pager"
"browser"
];
key = "d";
action = "half-down";
}
{
map = [
"index"
"pager"
"browser"
];
key = "u";
action = "half-up";
}
{
map = [ "index" ];
key = "R";
action = "group-reply";
}
{
map = [ "index" ];
key = "\\031";
action = "previous-undeleted";
}
{
map = [ "index" ];
key = "\\005";
action = "next-undeleted";
}
{
map = [ "pager" ];
key = "\\031";
action = "previous-line";
}
{
map = [ "pager" ];
key = "\\005";
action = "next-line";
}
{
map = [ "editor" ];
key = "<Tab>";
action = "complete-query";
}
{
map = [
"index"
"pager"
];
key = "\\Ck";
action = "sidebar-prev";
}
{
map = [
"index"
"pager"
];
key = "\\Cj";
action = "sidebar-next";
}
{
map = [
"index"
"pager"
];
key = "\\Co";
action = "sidebar-open";
}
{
map = [
"index"
"pager"
];
key = "\\Cp";
action = "sidebar-prev-new";
}
{
map = [
"index"
"pager"
];
key = "\\Cn";
action = "sidebar-next-new";
}
{
map = [
"index"
"pager"
];
key = "B";
action = "sidebar-toggle-visible";
}
{
map = [
"index"
"pager"
];
key = "@";
action = "compose-to-sender";
}
{
map = [
"index"
"pager"
];
key = "D";
action = "purge-message";
}
{
map = [ "index" ];
key = "<tab>";
action = "sync-mailbox";
}
{
map = [ "index" ];
key = "<space>";
action = "collapse-thread";
}
{
map = [ "editor" ];
key = "<Tab>";
action = "complete-query";
}
{
map = [ "editor" ];
key = "^T";
action = "complete";
}
# {
# map = [
# "index"
# "pager"
# ];
# key = "<f2>";
# action = "<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/uchicago<enter><change-folder>!<enter>";
# }
# {
# map = [
# "index"
# "pager"
# ];
# key = "<f3>";
# action = "<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/personal<enter><change-folder>!<enter>";
# }
# {
# map = [ "attach" ];
# key = "V";
# action = "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt-mail.html<enter><shell-escape>xdg-open ~/.cache/mutt-mail.html<enter>";
# }
];
macros = [
{
map = [
"index"
"pager"
];
key = "a";
action = ":set confirmappend=no delete=yes\\n<tag-prefix><save-message>=Archive\\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\\n";
}
{
map = [
"index"
"pager"
];
key = "n";
action = "<tag-prefix><clear-flag>N<untag-pattern>.<enter>\\n";
}
{
map = [
"attach"
];
key = "O";
action = "<enter-command>unset wait_key<enter><shell-escape>rm -f /tmp/mutt-attach<enter><save-entry><kill-line>/tmp/mutt-attach<enter>^A";
}
];
}