From 5e83a094476f28eb77508c8b470efe3dfd56de83 Mon Sep 17 00:00:00 2001 From: Mohammad Reza Karimi Date: Fri, 9 Jan 2026 17:34:31 -0500 Subject: some big changes --- aerc/dot-config/aerc/accounts.conf | 14 ++ aerc/dot-config/aerc/aerc.conf | 203 +++++++++++++++++++++++++ aerc/dot-config/aerc/binds.conf | 163 ++++++++++++++++++++ aerc/dot-config/aerc/stylesets/default_nicer | 89 +++++++++++ aerc/dot-config/aerc/templates/forward_as_body | 6 + aerc/dot-config/aerc/templates/new_message | 4 + aerc/dot-config/aerc/templates/quoted_reply | 10 ++ 7 files changed, 489 insertions(+) create mode 100644 aerc/dot-config/aerc/accounts.conf create mode 100644 aerc/dot-config/aerc/aerc.conf create mode 100644 aerc/dot-config/aerc/binds.conf create mode 100644 aerc/dot-config/aerc/stylesets/default_nicer create mode 100644 aerc/dot-config/aerc/templates/forward_as_body create mode 100644 aerc/dot-config/aerc/templates/new_message create mode 100644 aerc/dot-config/aerc/templates/quoted_reply (limited to 'aerc') diff --git a/aerc/dot-config/aerc/accounts.conf b/aerc/dot-config/aerc/accounts.conf new file mode 100644 index 0000000..801c56b --- /dev/null +++ b/aerc/dot-config/aerc/accounts.conf @@ -0,0 +1,14 @@ +[MIT] +source = maildir:///home/moreka/.local/share/mail/mit +outgoing = /usr/bin/msmtp +default = INBOX +from = Mohammad Reza Karimi +copy-to = Sent +postpone = Drafts +trash = Deleted +archive = Archive + +check-mail-cmd = mbsync mit +check-mail-timeout = 20s + +folders-sort = INBOX,Sent,Drafts,Archive diff --git a/aerc/dot-config/aerc/aerc.conf b/aerc/dot-config/aerc/aerc.conf new file mode 100644 index 0000000..7f0d08d --- /dev/null +++ b/aerc/dot-config/aerc/aerc.conf @@ -0,0 +1,203 @@ +[general] +default-save-path=~/Downloads +pgp-provider=gpg +unsafe-accounts-conf=false +log-file=~/.cache/aerc.log +log-level=warn +term=alacritty +enable-osc8=true +# default-menu-cmd=ranger --choosefiles=%f +default-menu-cmd=fzf --multi + +[ui] +# +# Describes the format for each row in a mailbox view. This is a comma +# separated list of column names with an optional align and width suffix. After +# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment +# characters can be added (by default, left) followed by an optional width +# specifier. The width is either an integer representing a fixed number of +# characters, or a percentage between 1% and 99% representing a fraction of the +# terminal width. It can also be one of the '*' (auto) or '=' (fit) special +# width specifiers. Auto width columns will be equally attributed the remaining +# terminal width. Fit width columns take the width of their contents. If no +# width specifier is set, '*' is used by default. +index-columns=flags:5,name<20%,subject,date>= + + +# Each name in index-columns must have a corresponding column-$name setting. +# All column-$name settings accept golang text/template syntax. See +# aerc-templates(7) for available template attributes and functions. +# +# Here are some examples to show the To field instead of the From field for +# an email (modifying column-name): +# +# 1. a generic one +# column-name={{ .Peer | names | join ", " }} +# 2. based upon the selected folder +# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}} +# +# Default settings +column-flags={{.Flags | join " "}} +#column-name={{index (.From | names) 0}} +#column-subject={{.ThreadPrefix}}{{.Subject}} +#column-date={{.DateAutoFormat .Date.Local}} + +column-separator=" " + +timestamp-format=2006 Jan 02 +this-day-time-format=15:04 +this-week-time-format=Mon Jan 02 +this-year-time-format=Jan 02 +message-view-timestamp-format=2006 Jan 02, 15:04 GMT-0700 +sidebar-width=14 +# message-list-split=horizontal 20 +mouse-enabled=true +new-message-bell=false +dirlist-delay=200ms + +next-message-on-delete=false +auto-mark-read=true +auto-mark-read-split=false +#auto-mark-read-split-delay=3s + +styleset-name=default_nicer + +fuzzy-complete=true + +#completion-delay=250ms +#completion-min-chars=1 +#completion-popovers=true + +icon-encrypted = 󰌆 +icon-signed =  +icon-unknown = [ ?] +icon-invalid = [ !] +icon-attachment =  +icon-new = • +icon-old = ◦ +icon-replied =  +icon-forwarded =  +icon-flagged =  +icon-marked = * +icon-draft = d +icon-deleted =  + +[ui:folder~Sent] +index-columns=flags:5,name<20%,subject,date>= +column-name = {{if .To}}{{index (.To | names) 0}}{{else}} malformed email{{end}} +column-flags = {{.Flags | join " "}} + +[statusline] + +[viewer] +pager=less -Rc +alternatives=text/plain,text/html +show-headers=false +header-layout=From,To,Cc,Bcc,Date,Subject +always-show-mime=false + +[compose] +editor=nvim +header-layout=To,From,Subject +edit-headers=false +focus-body=false + +address-book-cmd=grep -i -m 100 %s /home/moreka/.cache/maildir-rank-addr/addressbook.tsv + +file-picker-cmd=lf -selection-path '%f' + +reply-to-self=false +empty-subject-warning=true +no-attachment-warning=^[^>]*attach(ed|ment) +format-flowed=true + +[multipart-converters] + +text/html=pandoc -f markdown -t html --standalone + +[filters] +# +# Filters allow you to pipe an email body through a shell command to render +# certain emails differently, e.g. highlighting them with ANSI escape codes. +# +# The commands are invoked with sh -c. The following folders are prepended to +# the system $PATH to allow referencing filters from their name only: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters +# ~/.local/libexec/aerc/filters +# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters +# $PREFIX/libexec/aerc/filters +# $PREFIX/share/aerc/filters +# /usr/libexec/aerc/filters +# /usr/share/aerc/filters +# +# If you want to run a program in your default $PATH which has the same name +# as a builtin filter (e.g. /usr/bin/colorize), use its absolute path. +# +# The following variables are defined in the filter command environment: +# +# AERC_MIME_TYPE the part MIME type/subtype +# AERC_FORMAT the part content type format= parameter +# AERC_FILENAME the attachment filename (if any) +# AERC_SUBJECT the message Subject header value +# AERC_FROM the message From header value +# +# The first filter which matches the email's mimetype will be used, so order +# them from most to least specific. +# +# You can also match on non-mimetypes, by prefixing with the header to match +# against (non-case-sensitive) and a comma, e.g. subject,text will match a +# subject which contains "text". Use header,~regex to match against a regex. +# +text/plain=colorize +text/calendar=calendar +message/delivery-status=colorize +message/rfc822=colorize +#text/html=pandoc -f html -t plain | colorize +text/html=! html +#text/html=! w3m -T text/html -I UTF-8 +text/*=bat -fP --file-name="$AERC_FILENAME" +application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100 +.headers=colorize + +[openers] +# x-scheme-handler/http*=printf '%s' {} | wl-copy +text/html=runapp -o -- qutebrowser +text/plain=runapp -o -- alacritty -e nvim {} +125 + +[hooks] +# +# Hooks are triggered whenever the associated event occurs. + +# +# Executed when a new email arrives in the selected folder +#mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT" + +# +# Executed when mail is deleted from a folder +#mail-deleted=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +# +# Executed when aerc adds mail to a folder +#mail-added=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +# +# Executed when aerc starts +#aerc-startup=aerc :terminal calcurse && aerc :next-tab + +# +# Executed when aerc shuts down. +#aerc-shutdown= + +# +# Executed when notmuch tags are modified. +#tag-modified= + +# +# Executed when flags are changed on a message. +#flag-changed=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +[templates] +new-message=new_message +quoted-reply=quoted_reply +forwards=forward_as_body diff --git a/aerc/dot-config/aerc/binds.conf b/aerc/dot-config/aerc/binds.conf new file mode 100644 index 0000000..87b6c50 --- /dev/null +++ b/aerc/dot-config/aerc/binds.conf @@ -0,0 +1,163 @@ + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab + = :term +? = :help keys + = :prompt 'Quit?' quit + = :prompt 'Quit?' quit + = :suspend + +[messages] +# q = :prompt 'Quit?' quit +q = :quit + +# to change mailbox folders + = :menu -ad :cf -a + +j = :next + = :next + = :next 50% + = :next 100% + +k = :prev + = :prev + = :prev 50% + = :prev 100% +gg = :select 0 +G = :select -1 + +gi = :cf -a MIT INBOX +gs = :cf -a MIT Sent +ga = :cf -a MIT Archive + +J = :next-folder +K = :prev-folder + +v = :mark -t + = :mark -t:next +V = :mark -v +gv = :remark + +T = :toggle-threads +zc = :fold +zo = :unfold +za = :fold -t +zM = :fold -a +zR = :unfold -a + = :fold -t + +zz = :align center +zt = :align top +zb = :align bottom + + = :view +d = :choose -o y 'Really delete this message' delete-message +D = :delete +a = :archive flat +A = :unmark -a:mark -T:archive flat +u = :read -t:next + +m = :compose + +b = :bounce + +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 + +s = :split +S = :vsplit + +O = :check-mail + +[messages:folder=Drafts] + = :recall + +[view] +/ = :toggle-key-passthrough/ +q = :close +O = :open +o = :open +S = :save +| = :pipe +D = :delete +A = :archive flat + + = :copy-link + = :open-link + +f = :forward +rr = :reply -a +rq = :reply -aq +Rr = :reply +Rq = :reply -q + +H = :toggle-headers +K = :prev-part +J = :next-part + = :next + = :prev + +[view::passthrough] +$noinherit = true +$ex = + = :toggle-key-passthrough + +[compose] +# Keybindings used when the embedded terminal is not selected in the compose +# view +$noinherit = true +$ex = +$complete = + = :prev-field + = :next-field + = :next-field + = :prev-field + = :prev-tab + = :next-tab + +[compose::editor] +# Keybindings used when the embedded terminal is selected in the compose view +$noinherit = true +$ex = + = :prev-field + = :next-field + = :prev-tab + = :next-tab + = :attach -m + = :abort + + +[compose::review] +# Keybindings used when reviewing a message to be sent +# Inline comments are used as descriptions on the review screen +y = :send # Send +n = :abort # Abort (discard message, no confirmation) +s = :sign # Toggle signing +x = :encrypt # Toggle encryption to all recipients +v = :preview # Preview message +p = :postpone # Postpone +q = :choose -o d discard abort -o p postpone postpone # Abort or postpone +e = :edit # Edit (body and headers) +a = :attach # Add attachment +d = :detach # Remove attachment + +[terminal] +$noinherit = true +$ex = + + = :prev-tab + = :next-tab diff --git a/aerc/dot-config/aerc/stylesets/default_nicer b/aerc/dot-config/aerc/stylesets/default_nicer new file mode 100644 index 0000000..301a028 --- /dev/null +++ b/aerc/dot-config/aerc/stylesets/default_nicer @@ -0,0 +1,89 @@ +# vim: ft=dosini +# +# aerc default styleset (with changes) +# + +# Uncomment these two lines to reset all attributes (except in the [viewer] +# section) and start from scratch. +#*.default = true +#*.normal = true + +*.selected.bg = 12 +*.selected.fg = 0 +*.selected.bold = false + +tab.selected.fg = #ffffff +tab.selected.bg = #1640b0 +tab.selected.bold = false + +dirlist*.selected.bg = 11 +dirlist*.selected.fg = 0 +dirlist*.selected.bold = true + +#statusline_*.dim = true + +#*warning.dim = false +#*warning.bold = true +#*warning.fg = 11 +#*success.dim = false +#*success.bold = true +#*success.fg = 10 +#*error.dim = false +#*error.bold = true +#*error.fg = 9 + +#border.fg = 12 +#border.bold = true + +#title.bg = 12 +#title.fg = 15 +#title.bold = true + +#header.fg = 4 +#header.bold = true + +#msglist_unread.bold = true +#msglist_deleted.dim = true +#msglist_marked.bg = 6 +#msglist_marked.fg = 15 +#msglist_pill.bg = 12 +#msglist_pill.fg = 15 + +#part_mimetype.fg false + +#selector_chooser.bold = true +#selector_focused.bold = true +#selector_focused.bg = 12 +#selector_focused.fg = 15 + +#completion_*.bg = 8 +#completion_pill.bg = 12 +#completion_default.fg = 15 +#completion_description.fg = 15 +#completion_description.dim = true + +#[viewer] +# Uncomment these two lines to reset all attributes in the [viewer] section. +#*.default = true +#*.normal = true +#url.underline = true +#url.fg = 3 +#header.bold = true +#header.fg = 4 +#signature.dim = true +#signature.fg = 4 +#diff_meta.bold = true +#diff_chunk.fg = 6 +#diff_chunk_func.fg = 6 +#diff_chunk_func.dim = true +#diff_add.fg = 2 +#diff_del.fg = 1 +#quote_1.fg = 6 +#quote_2.fg = 4 +#quote_3.fg = 6 +#quote_3.dim = true +#quote_4.fg = 4 +#quote_4.dim = true +#quote_x.fg = 5 +#quote_x.dim = true + diff --git a/aerc/dot-config/aerc/templates/forward_as_body b/aerc/dot-config/aerc/templates/forward_as_body new file mode 100644 index 0000000..d4c9dbf --- /dev/null +++ b/aerc/dot-config/aerc/templates/forward_as_body @@ -0,0 +1,6 @@ +Forwarded message from {{.OriginalFrom | names | join ", "}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 15:04 MST"}}: +{{.OriginalText}} +{{- with .Signature }} + +{{.}} +{{- end }} diff --git a/aerc/dot-config/aerc/templates/new_message b/aerc/dot-config/aerc/templates/new_message new file mode 100644 index 0000000..235d6be --- /dev/null +++ b/aerc/dot-config/aerc/templates/new_message @@ -0,0 +1,4 @@ +{{- with .Signature }} + +{{.}} +{{- end -}} diff --git a/aerc/dot-config/aerc/templates/quoted_reply b/aerc/dot-config/aerc/templates/quoted_reply new file mode 100644 index 0000000..27a3892 --- /dev/null +++ b/aerc/dot-config/aerc/templates/quoted_reply @@ -0,0 +1,10 @@ +On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 15:04 MST"}}, {{.OriginalFrom | names | join ", "}} wrote: +{{ if eq .OriginalMIMEType "text/html" -}} +{{- exec `html` .OriginalText | trimSignature | quote -}} +{{- else -}} +{{- trimSignature .OriginalText | quote -}} +{{- end}} +{{- with .Signature }} + +{{.}} +{{- end }} -- cgit v1.2.3-71-gdd5e