home/email: add more aerc configs

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-26 17:40:02 +03:00
parent b5c022c4e0
commit 45265d82f2
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 123 additions and 33 deletions

View file

@ -273,15 +273,15 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1664052375, "lastModified": 1664194888,
"narHash": "sha256-NxB075dSTaZXUtoU3+BgFmErQ7tprIbjQ+UP8rU/3+4=", "narHash": "sha256-OHAzSUrVkLFOaQUGD7b6Gz6CvdJRGcg3i4hZO9su40o=",
"rev": "d6a70d64ea041ff33640b74354f69af58db62078", "ref": "refs/heads/main",
"revCount": 37, "rev": "c23fb7add5eb01c04c9257305f8bfa11d7f2410d",
"revCount": 39,
"type": "git", "type": "git",
"url": "https://git.pleshevski.ru/mynix/neovim" "url": "https://git.pleshevski.ru/mynix/neovim"
}, },
"original": { "original": {
"rev": "d6a70d64ea041ff33640b74354f69af58db62078",
"type": "git", "type": "git",
"url": "https://git.pleshevski.ru/mynix/neovim" "url": "https://git.pleshevski.ru/mynix/neovim"
} }

View file

@ -27,7 +27,7 @@
# my neovim configuration # my neovim configuration
myneovim = { myneovim = {
url = "git+https://git.pleshevski.ru/mynix/neovim?rev=d6a70d64ea041ff33640b74354f69af58db62078"; url = "git+https://git.pleshevski.ru/mynix/neovim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -4,6 +4,9 @@ with lib;
let let
cfg = config.progs.aerc; cfg = config.progs.aerc;
exec = cmd: ":${cmd}<Enter>";
fill = cmd: ":${cmd}<space>";
in in
{ {
options.progs.aerc = { options.progs.aerc = {
@ -18,8 +21,29 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.aerc = { programs.aerc = {
enable = true; enable = true;
# See: https://man.archlinux.org/man/aerc-config.5.en
extraConfig = { extraConfig = {
general.unsafe-accounts-conf = true; general = {
unsafe-accounts-conf = true;
};
ui = {
index-format = "%-17.17D %-20.20n %Z %-20.20g %s";
# See https://godoc.org/time#Time.Format
timestamp-format = "2006-01-02 15:04 MST";
this-day-time-format = "15:04";
this-week-time-format = "Monday 15:04";
this-year-time-format = "02 January";
pinned-tab-marker = "";
border-char-vertical = "";
border-char-horizontal = "";
fuzzy-complete = true;
new-message-bell = false;
};
statusline = {
display-mode = "icon";
};
filters = { filters = {
"text/plain" = "${./colorize}"; "text/plain" = "${./colorize}";
@ -28,46 +52,112 @@ in
}; };
extraBinds = { extraBinds = {
messages = { messages = {
"q" = ":quit<Enter>"; "q" = exec "quit";
"gt" = ":next-tab<Enter>"; "gt" = exec "next-tab";
"gT" = ":prev-tab<Enter>"; "gT" = exec "prev-tab";
"j" = ":next<Enter>"; "j" = exec "next";
"<Down>" = ":next<Enter>"; "<Down>" = exec "next";
"<C-d>" = ":next 50%<Enter>"; "<C-d>" = exec "next 50%";
"k" = ":prev<Enter>"; "k" = exec "prev";
"<Up>" = ":prev<Enter>"; "<Up>" = exec "prev";
"<C-b>" = ":prev 50%<Enter>"; "<C-b>" = exec "prev 50%";
"gg" = ":select 0<Enter>"; "gg" = exec "select 0";
"G" = ":select -1<Enter>"; "G" = exec "select -1";
"J" = ":next-folder<Enter>"; "J" = exec "next-folder";
"K" = ":prev-folder<Enter>"; "K" = exec "prev-folder";
"c" = fill "cf";
"<Enter>" = ":view<Enter>"; "<Enter>" = exec "view";
"C" = exec "compose";
"/" = fill "search";
"\\" = fill "filter";
"n" = exec "next-result";
"N" = exec "prev-result";
"U" = exec "unsubscribe";
"D" = exec "delete";
"A" = exec "archive flat";
#"D" = exec "modify-labels +deleted -inbox";
#"A" = exec "modify-labels -inbox";
#"ms" = exec "modify-labels +spam -inbox";
#"mS" = exec "modify-labels -spam +inbox";
}; };
view = { view = {
"q" = ":close<Enter>"; "q" = exec "close";
"O" = ":open<Enter>"; "O" = exec "open";
"S" = ":save<space>"; "S" = fill "save";
"f" = ":forward<Enter>"; "f" = exec "forward";
"rr" = ":reply -a<Enter>"; "rr" = exec "reply -a";
"rq" = ":reply -aq<Enter>"; "rq" = exec "reply -aq";
"Rr" = ":reply<Enter>"; "Rr" = exec "reply";
"Rq" = ":reply -q<Enter>"; "Rq" = exec "reply -q";
"<C-k>" = ":prev-part<Enter>"; "<C-k>" = exec "prev-part";
"<C-j>" = ":next-part<Enter>"; "<C-j>" = exec "next-part";
"J" = ":next<Enter>"; "J" = exec "next";
"K" = ":prev<Enter>"; "K" = exec "prev";
"U" = exec "unsubscribe";
"D" = exec "delete";
"A" = exec "archive flat";
# "ms" = exec "modify-labels +spam -inbox";
# "mS" = exec "modify-labels -spam +inbox";
}; };
compose = {
"$ex" = "<C-x>";
"<C-k>" = exec "prev-field";
"<C-j>" = exec "next-field";
"<tab>" = exec "next-field";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = exec "prev-field";
"<C-j>" = exec "next-field";
};
"compose::review" = {
"y" = exec "send";
"n" = exec "abort";
"p" = exec "postpone";
"q" = exec "choose -o d discard abort -o p postpone postpone";
"e" = exec "edit";
"a" = fill "attach";
"d" = fill "detach";
};
};
stylesets.default = {
"*.selected.reverse" = true;
"title.reverse" = true;
"header.bold" = true;
"*error.bold" = true;
"error.fg" = 1;
"warning.fg" = 3;
"success.fg" = 2;
"statusline_default.bg" = 0;
"statusline_error.fg" = 1;
"statusline_error.reverse" = true;
"statusline_success.fg" = 2;
"statusline_success.reverse" = true;
"msglist_unread.bold" = true;
"msglist_deleted.fg" = 10;
"tab.bg" = 11;
"tab.selected.reverse" = false;
"tab.selected.bg" = 12;
"tab.fg" = 0;
"completion_default.bg" = 0;
}; };
}; };
}; };

Binary file not shown.