aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/muttrc
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-05 09:02:39 +0200
committerneodarz <neodarz@neodarz.net>2019-09-05 09:02:39 +0200
commit72d698979fdaa6dbd1b1d3d41b69d94ddd83f4de (patch)
tree5a8df180f6139762e6b5c0ea2372a76c5df5e4c1 /dotfiles/muttrc
parent82335ab01503ade18c5e830739b218fbdf1445d5 (diff)
downloaddotfiles_dotdrop-72d698979fdaa6dbd1b1d3d41b69d94ddd83f4de.tar.xz
dotfiles_dotdrop-72d698979fdaa6dbd1b1d3d41b69d94ddd83f4de.zip
Add mutt config
Diffstat (limited to '')
-rw-r--r--dotfiles/muttrc125
1 files changed, 125 insertions, 0 deletions
diff --git a/dotfiles/muttrc b/dotfiles/muttrc
new file mode 100644
index 0000000..1505f7d
--- /dev/null
+++ b/dotfiles/muttrc
@@ -0,0 +1,125 @@
+# Store message headers locally to speed things up.
+# If hcache is a folder, Mutt will create sub cache folders for each account which may speeds things up even more.
+set header_cache = ~/.cache/mutt
+
+# Store messages locally to speed things up, like searching message bodies.
+# Can be the same folder as header_cache.
+# This will cost important disk usage according to your e-mail amount.
+set message_cachedir = "~/.cache/mutt"
+
+set sidebar_visible = yes
+set editor="nvim + -c 'set ft=mail tw=80' -c ':0/^$'"
+set sort=threads
+
+# Folder hooks
+folder-hook 'account.net.neodarz.neodarz' 'source ~/.mutt/account.net.neodarz.neodarz'
+folder-hook 'account.net.neodarz.corentin.breton' 'source ~/.mutt/account.net.neodarz.corentin.breton'
+folder-hook 'account.fr.happy-dev.neodarz' 'source ~/.mutt/account.fr.happy-dev.neodarz'
+
+# GPG commands
+source ~/.mutt/gpg.rc
+
+# Macros for switching accounts
+macro index <f2> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.net.neodarz.neodarz<enter><change-folder>!<enter>'
+macro index <f3> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.net.neodarz.corentin.breton<enter><change-folder>!<enter>'
+macro index <f4> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.fr.happy-dev.neodarz<enter><change-folder>!<enter>'
+
+# Fetch mail shortcut
+#bind index G imap-fetch-mail
+macro index,pager U '<shell-escape>offlineimap &<enter>'
+
+macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
+macro attach W <save-entry><kill-line>/home/neodarz/attachments/
+macro attach E <save-entry><kill-line>/home/neodarz/attachments/<enter>
+
+# Default colour definitions
+color hdrdefault default default
+color quoted default default
+color signature default default
+color indicator black white
+color attachment default default
+color error default default
+color message default default
+color search brightwhite green
+color status default default
+color tree default default
+color normal default default
+color tilde default default
+color bold default default
+color markers red white
+
+# Colour definitions when on a mono screen
+mono bold bold
+mono underline underline
+mono indicator reverse
+
+# Colours for items in the reader
+color header brightwhite default "^(From|Subject|Date|To|User-Agent):"
+color header red default "^X-Junked-Because: "
+color header red default "^X-Virus-hagbard: .* FOUND"
+mono header bold "^(Date|To|User-Agent|From|Subject|X-Junked-Because|X-Virus-hagbard):"
+
+# Colours for items in the index
+color index green default ~N
+color index blue default ~O
+color index green white "~N (~x hagbard\.davep\.org | ~h \"^In-[Rr]eply-[Tt]o: .*hagbard\.davep\.org\")"
+color index red white ~F
+color index black green ~T
+color index brightwhite black ~D
+mono index bold ~N
+mono index bold ~F
+mono index bold ~T
+mono index bold ~D
+
+# Highlights inside the body of a message.
+
+# URLs
+color body black white "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*"
+color body black white "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
+color body black white "news:[^ \">\t\r\n]*"
+mono body bold "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*"
+mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
+mono body bold "news:[^ \">\t\r\n]*"
+
+# email addresses
+color body black white "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
+mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
+
+# prefer plain text
+alternative_order text/plain text/enriched text/html
+
+# auto convert text/html MIME type to text/plain
+auto_view text/html
+
+# run viewer defined in mailcap by <return> in attach view
+bind attach <return> view-mailcap
+
+# mailcap file to use (optional)
+set mailcap_path="~/.mutt/mailcap"
+
+
+# handover mail to htmail-view (works only for multipart mails containing text/html payload)
+macro index,pager H "<pipe-message>htmail-decode<return>" "render html mail using htmail-view"
+
+# This variable specifies notmuch query type, supported types: 'threads' and
+# 'messages'.
+set nm_query_type = threads
+
+# When set, mutt will use the first virtual mailbox (see virtual-mailboxes)
+# as a spoolfile.
+set virtual_spoolfile = yes
+
+# virtual-mailboxes description notmuch-URI { description notmuch-URI ...}
+virtual-mailboxes "Inbox" "notmuch://?query=tag:inbox"
+
+# Default account
+source ~/.mutt/account.net.neodarz.neodarz
+
+set query_command= "khard email --parsable --search-in-source-files '%s'"
+bind editor <Tab> complete-query
+bind editor ^T complete
+
+macro index,pager A \
+ "<pipe-message>khard add-email<return>" \
+ "add the sender email address to khard"
+