From 45265d82f27baa3d2198690998758d1e0d8a26b2 Mon Sep 17 00:00:00 2001 From: janabhumi Date: Mon, 26 Sep 2022 17:40:02 +0300 Subject: [PATCH] home/email: add more aerc configs --- flake.lock | 10 +-- flake.nix | 2 +- home/progs/aerc.nix | 144 +++++++++++++++++++++++++++++++++++--------- secrets.nix | Bin 1645 -> 1794 bytes 4 files changed, 123 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 7c02756..4fcc05c 100644 --- a/flake.lock +++ b/flake.lock @@ -273,15 +273,15 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1664052375, - "narHash": "sha256-NxB075dSTaZXUtoU3+BgFmErQ7tprIbjQ+UP8rU/3+4=", - "rev": "d6a70d64ea041ff33640b74354f69af58db62078", - "revCount": 37, + "lastModified": 1664194888, + "narHash": "sha256-OHAzSUrVkLFOaQUGD7b6Gz6CvdJRGcg3i4hZO9su40o=", + "ref": "refs/heads/main", + "rev": "c23fb7add5eb01c04c9257305f8bfa11d7f2410d", + "revCount": 39, "type": "git", "url": "https://git.pleshevski.ru/mynix/neovim" }, "original": { - "rev": "d6a70d64ea041ff33640b74354f69af58db62078", "type": "git", "url": "https://git.pleshevski.ru/mynix/neovim" } diff --git a/flake.nix b/flake.nix index 5b5743b..4191c99 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ # my neovim configuration myneovim = { - url = "git+https://git.pleshevski.ru/mynix/neovim?rev=d6a70d64ea041ff33640b74354f69af58db62078"; + url = "git+https://git.pleshevski.ru/mynix/neovim"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/home/progs/aerc.nix b/home/progs/aerc.nix index e0a91f6..d8e3e02 100644 --- a/home/progs/aerc.nix +++ b/home/progs/aerc.nix @@ -4,6 +4,9 @@ with lib; let cfg = config.progs.aerc; + + exec = cmd: ":${cmd}"; + fill = cmd: ":${cmd}"; in { options.progs.aerc = { @@ -18,8 +21,29 @@ in config = mkIf cfg.enable { programs.aerc = { enable = true; + # See: https://man.archlinux.org/man/aerc-config.5.en 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 = { "text/plain" = "${./colorize}"; @@ -28,46 +52,112 @@ in }; extraBinds = { messages = { - "q" = ":quit"; + "q" = exec "quit"; - "gt" = ":next-tab"; - "gT" = ":prev-tab"; + "gt" = exec "next-tab"; + "gT" = exec "prev-tab"; - "j" = ":next"; - "" = ":next"; - "" = ":next 50%"; + "j" = exec "next"; + "" = exec "next"; + "" = exec "next 50%"; - "k" = ":prev"; - "" = ":prev"; - "" = ":prev 50%"; + "k" = exec "prev"; + "" = exec "prev"; + "" = exec "prev 50%"; - "gg" = ":select 0"; - "G" = ":select -1"; + "gg" = exec "select 0"; + "G" = exec "select -1"; - "J" = ":next-folder"; - "K" = ":prev-folder"; + "J" = exec "next-folder"; + "K" = exec "prev-folder"; + "c" = fill "cf"; - "" = ":view"; + "" = 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 = { - "q" = ":close"; - "O" = ":open"; - "S" = ":save"; + "q" = exec "close"; + "O" = exec "open"; + "S" = fill "save"; - "f" = ":forward"; + "f" = exec "forward"; - "rr" = ":reply -a"; - "rq" = ":reply -aq"; - "Rr" = ":reply"; - "Rq" = ":reply -q"; + "rr" = exec "reply -a"; + "rq" = exec "reply -aq"; + "Rr" = exec "reply"; + "Rq" = exec "reply -q"; - "" = ":prev-part"; - "" = ":next-part"; - "J" = ":next"; - "K" = ":prev"; + "" = exec "prev-part"; + "" = exec "next-part"; + "J" = exec "next"; + "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" = ""; + "" = exec "prev-field"; + "" = exec "next-field"; + "" = exec "next-field"; + }; + + "compose::editor" = { + "$noinherit" = "true"; + "$ex" = ""; + "" = exec "prev-field"; + "" = 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; }; }; }; diff --git a/secrets.nix b/secrets.nix index e85676052cfe6a5144ce4b91458a5b3ac76e08cc..cc5c7eb87ca97017f3a4710ba46cb8e50e44c2b9 100644 GIT binary patch literal 1794 zcmV+d2mSZ}M@dveQdv+`00Ny>BjzuZg@8+Vo0BUQPx|1uZWXT1CL7bDwTHp?5kFM>9=+j z!eUVU-zP2jtq`JIXx!;>=b@Ly#UL9!=~I6h1q}wLp(&I7(nu%F#01-KQ5)US^kLax zJbKDgbmX#X7zjt085qK~x9J>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