NixOS-Configs/home/common/aerc.nix
2025-07-28 07:28:14 -05:00

97 lines
3.5 KiB
Nix

{ ... }: {
programs.aerc = {
enable = true;
extraConfig = {
ui = {
styleset-name = "dracula";
reverse-msglist-order = "true";
select-last-message = "true";
msglist-scroll-offset = "1";
threading-enabled = " true";
threading-by-subject = "true";
index-columns = "flags>=,date<=,name<20,subject<*,notmuch>=";
column-notmuch = ''
{{- (map .Labels (exclude .Folder) (exclude "replied|passed|attachment|flagged|unread|draft") | join ",") -}}'';
};
# hooks = {
# aerc-startup =
# "aerc :terminal ikhal && aerc :terminal domailtask.sh && aerc :next-tab";
# };
viewer = {
alternatives = "text/html,text/plain";
header-layout = "Subject,From,To,Cc|Bcc,Date";
};
compose = {
focus-body = "false";
address-book-cmd = "khard email --parsable -- %s";
file-picker-cmd = "lf %s";
header-layout = "Subject,From,To,Cc";
reply-to-self = "false";
empty-subject-warning = true;
no-attachment-warning = "attach(ed|ment)";
};
filters = {
"text/plain" = "colorize";
"text/calendar" = "calendar";
"message/delivery-status" = "colorize";
"message/rfc822" = "colorize";
"text/html" = "w3m -o display_link_number=1 -T text/html";
".headers" = "colorize";
};
# multipart-converters = {
# "text/html" = "links -html-numbered-links 1 -dump -force-html %s";
# };
openers = {
"application/octet-stream" = "catdoc %s";
"application/ms-tnef" = "tnef -w %s";
"application/pdf" = "mutt_bgrun pdfview %s";
"application/x-vCalendar" = "mutt-remind";
"application/x-zip-compressed" = "unzip -v %s";
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
"mutt_bgrun libreoffice %s";
"application/msword" = "mutt_bgrun libreoffice %s";
"application/vnd.msword" = "mutt_bgrun libreoffice %s";
"application/excel" = "mutt_bgrun libreoffice %s";
"application/msexcel" = "mutt_bgrun libreoffice %s";
"application/vnd.ms-excel" = "mutt_bgrun libreoffice %s";
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" =
"mutt_bgrun libreoffice %s";
"application/x-excel" = "mutt_bgrun libreoffice %s";
"application/x-msexcel" = "mutt_bgrun libreoffice %s";
"application/ms-Excel" = "mutt_bgrun libreoffice %s";
"application/vnd.ms-powerpoint" = "mutt_bgrun libreoffice %s";
"application/x-mspowerpoint" = "mutt_bgrun libreoffice %s";
"application/ppt" = "mutt_bgrun libreoffice %s";
"application/x-loimpress" = "mutt_bgrun libreoffice %s";
"application/zip" = "unzip -v %s";
"image/*" = "mutt_bgrun imv %s";
"text/directory" = "mutt.vcard.filter";
"text/html" = "mutt_bgrun /home/don/bin/myweb {}";
"text/x-vcard" = "mutt.vcard.filter";
"video/mpeg" = "mutt_bgrun mpv %s";
"audio/x-wav" = "mutt_bgrun mpv %s";
};
};
};
xdg.configFile."aerc/binds.conf" = {
source = ./files/aerc/binds.conf;
target = "aerc/binds.conf";
};
xdg.configFile."aerc/stylesets" = {
source = ./files/aerc/stylesets;
recursive = true;
target = "aerc/stylesets";
};
xdg.configFile."aerc/templates" = {
source = ./files/aerc/templates;
recursive = true;
target = "aerc/templates";
};
}