dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 4fc68617a4831c50fda52064db28c9f4bc58ff38 (patch)
parent a44c5288f8f5cc245e6471def68fa62342be7276
Author: Alex Karle <alex@alexkarle.com>
Date:   Sat, 22 May 2021 21:51:10 -0400

mutt: Split muttrc into sourceable common-config

This will enable me to use the same common config for both my personal
account and my work account.

Diffstat:
A.config/mutt/common.muttrc | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.config/mutt/muttrc | 101+++----------------------------------------------------------------------------
2 files changed, 100 insertions(+), 98 deletions(-)

diff --git a/.config/mutt/common.muttrc b/.config/mutt/common.muttrc @@ -0,0 +1,97 @@ +# Common muttrc -- source in muttrc.local +# In pursuit of an email client that sucks less + +################################################################################ +# General / Behavior +set ssl_force_tls = yes # Require encrypted connection + +# Attachments +set mailcap_path=~/.config/mutt/mailcap +auto_view text/html # tell mutt to load HTML via mailcap +alternative_order text/plain text/enriched text/html # prefer plaintext + +# Fetching Mail +set mail_check=90 # From the manual, over IMAP, 90 reasonable value +set timeout=15 # mutt blocks mail check if no user input + +# Caching (speeds up IMAP considerably to not redownload every time) +set header_cache="~/.config/mutt/cache" +set message_cachedir="~/.config/mutt/cache" + +# BCC self to show up in INBOX +my_hdr BCC: $from + +# Use the `abook` program for contact management/completions +set query_command="abook --mutt-query '%s'" + +# Enables shelling out in macros without a pause +set wait_key=no + +################################################################################ +# Appearance / Layout +set sort=threads +set sort_aux=reverse-last-date-received + +# Show some index in the pager +set pager_index_lines=6 + +# Restrict quotes to |, :, and > (default has } and # which match code) +set quote_regexp="^([ \t]*[|>:])+" +color index yellow black ~U +color quoted green black +color quoted1 blue black +color quoted2 magenta black +color quoted3 yellow black +color quoted4 red black + +# Patch highting +color body green black "^\\+.*" +color body red black "^-.*" +color body magenta black "^\\+\\+\\+ b/.*" +color body magenta black "^--- a/.*" +color body magenta black "^@@.*@@" +color body magenta black "^@@.*@@" +color body magenta black "^diff --git.*" +color body magenta black "^index [0-9a-z]{7}\\.\\.[0-9a-z]{7}.*" + +################################################################################ +# Bindings +# I've chosen to customize-as-I-go on these. Some general guiding rules: +# 1. Vi-like +# - Obvious reasons +# 2. Non-destructive +# - Especially as a newby, its **the worst** to have CTRL-D +# which I spam in Vim for half-down to delete 5-10 messages +# in the pager before I've realized what I've done. + +# Navigation +bind pager j next-line +bind pager k previous-line +bind index G last-entry +bind pager G bottom +bind index,pager g noop # good practice, as gg prevents g from binding +bind index gg first-entry +bind pager gg top +bind index,pager \CD half-down +bind index,pager \CU half-up +bind index,pager d half-down +bind index,pager u half-up +bind index,pager <up> previous-unread +bind index,pager <down> next-unread +bind index,pager <tab> next-unread + +# Functional +bind index,pager h help +bind index,pager ? search-reverse +bind index N search-opposite +bind index,pager R group-reply +bind index \CN toggle-new +bind attach <return> view-mailcap +bind editor <Tab> complete-query # Used for contact-completion + +# Macros +macro index,pager ga "<pipe-message>abook --add-email-quiet<return>" "Add sender to abook contacts" +macro index g$ "<sync-mailbox><shell-escape>mbsync -a<return>" "Sync with mbsync" + +# set send_multipart_alternative=ask-no +# set send_multipart_alternative_filter=markdown2html diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -1,99 +1,4 @@ -# muttrc -# In pursuit of an email client that sucks less - -################################################################################ -# General / Behavior +# Source common config and local config +# common should *not* source local to enable multiple muttrc's to coexist +source ~/.config/mutt/common.muttrc source ~/.config/mutt/muttrc.local - -set ssl_force_tls = yes # Require encrypted connection - -# Attachments -set mailcap_path=~/.config/mutt/mailcap -auto_view text/html # tell mutt to load HTML via mailcap -alternative_order text/plain text/enriched text/html # prefer plaintext - -# Fetching Mail -set mail_check=90 # From the manual, over IMAP, 90 reasonable value -set timeout=15 # mutt blocks mail check if no user input - -# Caching (speeds up IMAP considerably to not redownload every time) -set header_cache="~/.config/mutt/cache" -set message_cachedir="~/.config/mutt/cache" - -# BCC self to show up in INBOX -my_hdr BCC: $from - -# Use the `abook` program for contact management/completions -set query_command="abook --mutt-query '%s'" - -# Enables shelling out in macros without a pause -set wait_key=no - -################################################################################ -# Appearance / Layout -set sort=threads -set sort_aux=reverse-last-date-received - -# Show some index in the pager -set pager_index_lines=6 - -# Restrict quotes to |, :, and > (default has } and # which match code) -set quote_regexp="^([ \t]*[|>:])+" -color index yellow black ~U -color quoted green black -color quoted1 blue black -color quoted2 magenta black -color quoted3 yellow black -color quoted4 red black - -# Patch highting -color body green black "^\\+.*" -color body red black "^-.*" -color body magenta black "^\\+\\+\\+ b/.*" -color body magenta black "^--- a/.*" -color body magenta black "^@@.*@@" -color body magenta black "^@@.*@@" -color body magenta black "^diff --git.*" -color body magenta black "^index [0-9a-z]{7}\\.\\.[0-9a-z]{7}.*" - -################################################################################ -# Bindings -# I've chosen to customize-as-I-go on these. Some general guiding rules: -# 1. Vi-like -# - Obvious reasons -# 2. Non-destructive -# - Especially as a newby, its **the worst** to have CTRL-D -# which I spam in Vim for half-down to delete 5-10 messages -# in the pager before I've realized what I've done. - -# Navigation -bind pager j next-line -bind pager k previous-line -bind index G last-entry -bind pager G bottom -bind index,pager g noop # good practice, as gg prevents g from binding -bind index gg first-entry -bind pager gg top -bind index,pager \CD half-down -bind index,pager \CU half-up -bind index,pager d half-down -bind index,pager u half-up -bind index,pager <up> previous-unread -bind index,pager <down> next-unread -bind index,pager <tab> next-unread - -# Functional -bind index,pager h help -bind index,pager ? search-reverse -bind index N search-opposite -bind index,pager R group-reply -bind index \CN toggle-new -bind attach <return> view-mailcap -bind editor <Tab> complete-query # Used for contact-completion - -# Macros -macro index,pager ga "<pipe-message>abook --add-email-quiet<return>" "Add sender to abook contacts" -macro index g$ "<sync-mailbox><shell-escape>mbsync -a<return>" "Sync with mbsync" - -# set send_multipart_alternative=ask-no -# set send_multipart_alternative_filter=markdown2html