aerc: add more bindigs
This commit is contained in:
parent
e4d7aa9baa
commit
a738fc02e8
1 changed files with 69 additions and 59 deletions
|
@ -1,8 +1,20 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
exec = cmd: ":${cmd}<Enter>";
|
exec = cmd: ":${cmd}<Enter>";
|
||||||
fill = cmd: ":${cmd}<space>";
|
fill = cmd: ":${cmd}<space>";
|
||||||
|
|
||||||
|
globalBinds = {
|
||||||
|
"gt" = exec "next-tab";
|
||||||
|
"gT" = exec "prev-tab";
|
||||||
|
};
|
||||||
|
|
||||||
|
commonMessageBinds = {
|
||||||
|
"U" = exec "unsubscribe";
|
||||||
|
"D" = exec "delete";
|
||||||
|
"A" = exec "archive flat";
|
||||||
|
"mS" = exec "move Junk";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
accounts.email.maildirBasePath = "${config.xdg.dataHome}/mail";
|
accounts.email.maildirBasePath = "${config.xdg.dataHome}/mail";
|
||||||
|
@ -27,7 +39,7 @@ in
|
||||||
border-char-vertical = "│";
|
border-char-vertical = "│";
|
||||||
border-char-horizontal = "─";
|
border-char-horizontal = "─";
|
||||||
fuzzy-complete = true;
|
fuzzy-complete = true;
|
||||||
new-message-bell = false;
|
new-message-bell = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
statusline = {
|
statusline = {
|
||||||
|
@ -40,12 +52,12 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraBinds = {
|
extraBinds = {
|
||||||
messages = {
|
messages = lib.mkMerge [
|
||||||
|
globalBinds
|
||||||
|
commonMessageBinds
|
||||||
|
{
|
||||||
"q" = exec "quit";
|
"q" = exec "quit";
|
||||||
|
|
||||||
"gt" = exec "next-tab";
|
|
||||||
"gT" = exec "prev-tab";
|
|
||||||
|
|
||||||
"j" = exec "next";
|
"j" = exec "next";
|
||||||
"<Down>" = exec "next";
|
"<Down>" = exec "next";
|
||||||
"<C-d>" = exec "next 50%";
|
"<C-d>" = exec "next 50%";
|
||||||
|
@ -68,17 +80,17 @@ in
|
||||||
"\\" = fill "filter";
|
"\\" = fill "filter";
|
||||||
"n" = exec "next-result";
|
"n" = exec "next-result";
|
||||||
"N" = exec "prev-result";
|
"N" = exec "prev-result";
|
||||||
|
|
||||||
"U" = exec "unsubscribe";
|
|
||||||
"D" = exec "delete";
|
|
||||||
"A" = exec "archive flat";
|
|
||||||
#"D" = exec "modify-labels +deleted -inbox";
|
#"D" = exec "modify-labels +deleted -inbox";
|
||||||
#"A" = exec "modify-labels -inbox";
|
#"A" = exec "modify-labels -inbox";
|
||||||
#"ms" = exec "modify-labels +spam -inbox";
|
#"ms" = exec "modify-labels +spam -inbox";
|
||||||
#"mS" = exec "modify-labels -spam +inbox";
|
#"mS" = exec "modify-labels -spam +inbox";
|
||||||
};
|
}
|
||||||
|
];
|
||||||
|
|
||||||
view = {
|
view = lib.mkMerge [
|
||||||
|
globalBinds
|
||||||
|
commonMessageBinds
|
||||||
|
{
|
||||||
"q" = exec "close";
|
"q" = exec "close";
|
||||||
"O" = exec "open";
|
"O" = exec "open";
|
||||||
"S" = fill "save";
|
"S" = fill "save";
|
||||||
|
@ -94,20 +106,18 @@ in
|
||||||
"<C-j>" = exec "next-part";
|
"<C-j>" = exec "next-part";
|
||||||
"J" = exec "next";
|
"J" = exec "next";
|
||||||
"K" = exec "prev";
|
"K" = exec "prev";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
"U" = exec "unsubscribe";
|
compose = lib.mkMerge [
|
||||||
"D" = exec "delete";
|
globalBinds
|
||||||
"A" = exec "archive flat";
|
{
|
||||||
# "ms" = exec "modify-labels +spam -inbox";
|
|
||||||
# "mS" = exec "modify-labels -spam +inbox";
|
|
||||||
};
|
|
||||||
|
|
||||||
compose = {
|
|
||||||
"$ex" = "<C-x>";
|
"$ex" = "<C-x>";
|
||||||
"<C-k>" = exec "prev-field";
|
"<C-k>" = exec "prev-field";
|
||||||
"<C-j>" = exec "next-field";
|
"<C-j>" = exec "next-field";
|
||||||
"<tab>" = exec "next-field";
|
"<tab>" = exec "next-field";
|
||||||
};
|
}
|
||||||
|
];
|
||||||
|
|
||||||
"compose::editor" = {
|
"compose::editor" = {
|
||||||
"$noinherit" = "true";
|
"$noinherit" = "true";
|
||||||
|
|
Loading…
Reference in a new issue