aboutsummaryrefslogtreecommitdiff
path: root/aerc
diff options
context:
space:
mode:
authorMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-09 17:34:31 -0500
committerMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-09 17:34:31 -0500
commit5e83a094476f28eb77508c8b470efe3dfd56de83 (patch)
treef0f39b694fcad8e408c2a41f3d3240dfce44c504 /aerc
parent6c17d2c74ea4daeb9dbf2c2b7aafeb86111b7f65 (diff)
some big changes
Diffstat (limited to 'aerc')
-rw-r--r--aerc/dot-config/aerc/accounts.conf14
-rw-r--r--aerc/dot-config/aerc/aerc.conf203
-rw-r--r--aerc/dot-config/aerc/binds.conf163
-rw-r--r--aerc/dot-config/aerc/stylesets/default_nicer89
-rw-r--r--aerc/dot-config/aerc/templates/forward_as_body6
-rw-r--r--aerc/dot-config/aerc/templates/new_message4
-rw-r--r--aerc/dot-config/aerc/templates/quoted_reply10
7 files changed, 489 insertions, 0 deletions
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 <moreka@mit.edu>
+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 @@
+<C-p> = :prev-tab<Enter>
+<C-PgUp> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
+<C-t> = :term<Enter>
+? = :help keys<Enter>
+<C-c> = :prompt 'Quit?' quit<Enter>
+<C-q> = :prompt 'Quit?' quit<Enter>
+<C-z> = :suspend<Enter>
+
+[messages]
+# q = :prompt 'Quit?' quit<Enter>
+q = :quit<Enter>
+
+# to change mailbox folders
+<C-o> = :menu -ad :cf -a<Enter>
+
+j = :next<Enter>
+<Down> = :next<Enter>
+<C-d> = :next 50%<Enter>
+<PgDn> = :next 100%<Enter>
+
+k = :prev<Enter>
+<Up> = :prev<Enter>
+<C-u> = :prev 50%<Enter>
+<PgUp> = :prev 100%<Enter>
+gg = :select 0<Enter>
+G = :select -1<Enter>
+
+gi = :cf -a MIT INBOX<Enter>
+gs = :cf -a MIT Sent<Enter>
+ga = :cf -a MIT Archive<Enter>
+
+J = :next-folder<Enter>
+K = :prev-folder<Enter>
+
+v = :mark -t<Enter>
+<Space> = :mark -t<Enter>:next<Enter>
+V = :mark -v<Enter>
+gv = :remark<Enter>
+
+T = :toggle-threads<Enter>
+zc = :fold<Enter>
+zo = :unfold<Enter>
+za = :fold -t<Enter>
+zM = :fold -a<Enter>
+zR = :unfold -a<Enter>
+<tab> = :fold -t<Enter>
+
+zz = :align center<Enter>
+zt = :align top<Enter>
+zb = :align bottom<Enter>
+
+<Enter> = :view<Enter>
+d = :choose -o y 'Really delete this message' delete-message<Enter>
+D = :delete<Enter>
+a = :archive flat<Enter>
+A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
+u = :read -t<Enter>:next<Enter>
+
+m = :compose<Enter>
+
+b = :bounce<space>
+
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+
+c = :cf<space>
+$ = :term<space>
+! = :term<space>
+| = :pipe<space>
+
+/ = :search<space>
+\ = :filter<space>
+n = :next-result<Enter>
+N = :prev-result<Enter>
+<Esc> = :clear<Enter>
+
+s = :split<Enter>
+S = :vsplit<Enter>
+
+O = :check-mail<Enter>
+
+[messages:folder=Drafts]
+<Enter> = :recall<Enter>
+
+[view]
+/ = :toggle-key-passthrough<Enter>/
+q = :close<Enter>
+O = :open<Enter>
+o = :open<Enter>
+S = :save<space>
+| = :pipe<space>
+D = :delete<Enter>
+A = :archive flat<Enter>
+
+<C-y> = :copy-link <space>
+<C-l> = :open-link <space>
+
+f = :forward<Enter>
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+
+H = :toggle-headers<Enter>
+K = :prev-part<Enter>
+J = :next-part<Enter>
+<C-j> = :next<Enter>
+<C-k> = :prev<Enter>
+
+[view::passthrough]
+$noinherit = true
+$ex = <C-x>
+<Esc> = :toggle-key-passthrough<Enter>
+
+[compose]
+# Keybindings used when the embedded terminal is not selected in the compose
+# view
+$noinherit = true
+$ex = <C-x>
+$complete = <C-o>
+<C-k> = :prev-field<Enter>
+<C-j> = :next-field<Enter>
+<tab> = :next-field<Enter>
+<backtab> = :prev-field<Enter>
+<C-p> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+
+[compose::editor]
+# Keybindings used when the embedded terminal is selected in the compose view
+$noinherit = true
+$ex = <A-x>
+<C-Up> = :prev-field<Enter>
+<C-Down> = :next-field<Enter>
+<C-PgUp> = :prev-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
+<A-a> = :attach -m<Enter>
+<C-q> = :abort<Enter>
+
+
+[compose::review]
+# Keybindings used when reviewing a message to be sent
+# Inline comments are used as descriptions on the review screen
+y = :send<Enter> # Send
+n = :abort<Enter> # Abort (discard message, no confirmation)
+s = :sign<Enter> # Toggle signing
+x = :encrypt<Enter> # Toggle encryption to all recipients
+v = :preview<Enter> # Preview message
+p = :postpone<Enter> # Postpone
+q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
+e = :edit<Enter> # Edit (body and headers)
+a = :attach<space> # Add attachment
+d = :detach<space> # Remove attachment
+
+[terminal]
+$noinherit = true
+$ex = <A-x>
+
+<C-PgUp> = :prev-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
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 }}