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 e856760..cc5c7eb 100644 Binary files a/secrets.nix and b/secrets.nix differ