{ config, ... }: { age.secrets."aerc-personal.conf".path = "${config.xdg.configHome}/aerc/accounts.conf"; programs = { aerc = { # FIXME: https://github.com/NixOS/nixpkgs/issues/326307 enable = false; extraConfig = { general = { default-save-path = "~/Downloads"; pgp-provider = "gpg"; # agenix manages the accounts.conf, # so the permissions appear unsafe to aerc unsafe-accounts-conf = true; }; ui = { border-char-vertical = "│"; border-char-horizontal = "─"; styleset-name = "catppuccin-mocha"; spinner = "▰▱▱▱▱▱▱,▰▰▱▱▱▱▱,▰▰▰▱▱▱▱,▰▰▰▰▱▱▱,▰▰▰▰▰▱▱,▰▰▰▰▰▰▱,▰▰▰▰▰▰▰"; spinner-interval = "40ms"; }; filters = { "text/plain" = "colorize"; "text/html" = "w3m -s -T text/html -o display_link_number=1 -dump | colorize"; "text/calendar" = "calendar"; "message/delivery-status" = "colorize"; "message/rfc822" = "colorize"; }; }; extraBinds = { global = { "" = ":prev-tab"; "" = ":next-tab"; "" = ":term"; "?" = ":help keys"; }; messages = { q = ":quit"; j = ":next"; k = ":prev"; "" = ":prev"; "" = ":next"; "" = ":next 50%"; "" = ":prev 50%"; "" = ":next 100%"; "" = ":prev 100%"; "" = ":next 100%"; "" = ":prev 100%"; g = ":select 0"; G = ":select -1"; H = ":collapse-folder"; J = ":next-folder"; K = ":prev-folder"; L = ":expand-folder"; v = ":mark -t"; V = ":mark -v"; T = ":toggle-threads"; "" = ":view"; d = ":prompt 'Really delete this message?' 'delete-message'"; D = ":delete"; A = ":archive flat"; C = ":compose"; rr = ":reply -a"; rq = ":reply -aq"; Rr = ":reply"; Rq = ":reply -q"; c = ":cf"; "$" = ":term"; "!" = ":term"; "|" = ":pipe"; "/" = ":search"; "\\" = ":filter"; n = ":next-result"; N = ":prev-result"; "" = ":clear"; }; "messages:folder=Drafts" = { "" = ":recall"; }; view = { "/" = ":toggle-key-passthrough/"; q = ":close"; O = ":open"; S = ":save"; "|" = ":pipe"; D = ":delete"; A = ":archive flat"; "" = ":open-link "; f = ":forward"; rr = ":reply -a"; rq = ":reply -aq"; Rr = ":reply"; Rq = ":reply -q"; H = ":toggle-headers"; "" = ":prev-part"; "" = ":next-part"; K = ":prev"; J = ":next"; }; "view::passthrough" = { "$noinherit" = "true"; "$ex" = ""; "" = ":toggle-key-passthrough"; }; # Keybindings used when the embedded terminal is not selected in the compose view "compose" = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-field"; "" = ":next-field"; "" = ":switch-account -p"; "" = ":switch-account -n"; "" = ":next-field"; "" = ":prev-field"; "" = ":prev-tab"; "" = ":next-tab"; }; # Keybindings used when the embedded terminal is selected in the compose view "compose::editor" = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-field"; "" = ":next-field"; "" = ":prev-tab"; "" = ":next-tab"; }; # Keybindings used when reviewing a message to be sent "compose::review" = { y = ":send"; n = ":abort"; v = ":preview"; p = ":postpone"; q = ":choose -o d discard abort -o p postpone postpone"; e = ":edit"; a = ":attach"; d = ":detach"; }; "terminal" = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-tab"; "" = ":next-tab"; }; }; }; }; }