Last active
January 13, 2017 23:13
-
-
Save SomeClown/5ffe06cc8a8388a299333d4f3f43c715 to your computer and use it in GitHub Desktop.
Example working muttrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Paths ---------------------------------------------- | |
source ~/.mutt/acme1_config | |
source ~/.mutt/acm2_config | |
source ~/.mutt/acme3_config | |
macro index <F1> '<sync-mailbox><enter-command>source ~/.mutt/acme1_config<enter><change-folder>!<enter>' | |
macro index <F2> '<sync-mailbox><enter-command>source ~/.mutt/acme2_config<enter><change-folder>!<enter>' | |
macro index <F3> '<sync-mailbox><enter-command>source ~/.mutt/acme3_config<enter><change-folder>!<enter>' | |
# Basic Options -------------------------------------- | |
set wait_key = no # shut up, mutt | |
set mbox_type = "maildir" # mailbox type | |
set timeout = 3 # idle time before scanning | |
set mail_check = 0 # minimum time between scans | |
unset move # gmail does that | |
set delete # don't ask, just do | |
unset confirmappend # don't ask, just do! | |
set quit # don't ask, just do!! | |
unset mark_old # read/new is good enough for me | |
set beep_new # bell on new mails | |
set pipe_decode # strip headers and eval mimes when piping | |
set thorough_search # strip headers and eval mimes before searching | |
set envelope_from | |
set smart_wrap | |
set check_new = yes | |
# Advanced Options ------------------------------------ | |
unset arrow_cursor | |
unset beep | |
unset beep_new | |
unset menu_scroll | |
unset mark_old | |
unset collapse_unread | |
unset mark_old | |
unset ignore_list_reply_to | |
set narrow_tree | |
set help | |
set copy=yes | |
set delete=yes | |
set move=no | |
set forward_quote=yes | |
set include=yes | |
set reverse_name | |
set ascii_chars=yes | |
set reverse_realname=yes | |
set reverse_alias=yes | |
set fast_reply=yes | |
set confirmappend=no | |
set pager_index_lines=15 | |
set markers | |
set smart_wrap | |
set pager_context=5 | |
set pager_stop = yes | |
set status_on_top | |
set sort = 'threads' | |
set strict_threads | |
set sort_aux = 'last-date-received' | |
set tilde | |
set sig_dashes | |
set editor="vim +/^$ ++1 -c 'set tw=76 expandtab nosmartindent spell'" | |
set header_cache="~/.mutt/headers" | |
bind editor <Tab> complete-query | |
bind index gg first-entry | |
bind index G last-entry | |
bind pager A group-reply | |
auto_view text/html | |
alternative_order text/calendar text/plain text/html | |
auto_view text/calendar application/ics | |
#macro index,pager a "<pipe-message>goobook add<return>" "Add the sender address to Google contacts" | |
# Sidebar Patch -------------------------------------- | |
set mail_check_stats = yes | |
set sidebar_divider_char = ' |' | |
set sidebar_visible = yes | |
set sidebar_width = 60 | |
set sidebar_short_path = yes | |
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" | |
set sidebar_folder_indent = yes | |
set sidebar_indent_string = "...." | |
color sidebar_indicator default color17 # Dark blue background | |
color sidebar_highlight white color238 # Grey background | |
color sidebar_spoolfile yellow default # Yellow | |
color sidebar_flagged red default # Red | |
color sidebar_divider color8 default # Dark grey | |
color sidebar_new brightblue default | |
bind index,pager \CN sidebar-next | |
bind index,pager \CP sidebar-prev | |
bind index,pager \Ca sidebar-open | |
# Status Bar ----------------------------------------- | |
set status_chars = " *%A" | |
set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" | |
# | |
# Header Options ------------------------------------- | |
ignore * # ignore all headers | |
unignore from: to: cc: date: subject: # show only these | |
unhdr_order * # some distros order things by default | |
hdr_order from: to: cc: date: subject: # and in this order | |
# Index View Options --------------------------------- | |
#set date_format = "%m/%d/%y" | |
set index_format = "[%Z] %-40.40D %-70.70F %s" | |
set sort = threads | |
set sort_browser = date | |
set sort_aux = reverse-last-date-received | |
set uncollapse_jump # don't collapse on an unread message | |
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" | |
# Formating | |
set compose_format="-- %v-- Compose [Approximate Message Size: %l Attachments: %a]%>-" | |
set attach_format="%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " | |
set alias_format="%4n %2f %t %-12a %r" | |
set status_format="-%r-%v--[%?M?%M/?%m msgs%?n?, %n new?%?d?, %d del?%?F?, %F flag?%?t?, %t tag?%?p?, %p postp?%?b?, %b inc?%?l?, %l?]--(%f)--%s-%>-%P-" | |
set folder_format="%3C %t%N %F %-8.8u %-8.8g %8s %d %f" | |
set message_format="%-.16n: %s" | |
set pager_format="~~~~~~~~~ On %{%a, %d %b %Y} at [%[%H:%M]]: %s %|~" | |
set attribution='On %{%a, %d %b %Y}, %n wrote:\n' | |
set forward_format = "[%s]" | |
# Colours | |
# | |
color normal brightyellow default | |
color error red default | |
color tilde black default | |
color message cyan default | |
color markers red white | |
color attachment white default | |
color search brightmagenta default | |
color status brightyellow black | |
color indicator brightblack yellow | |
color tree yellow default | |
# Basic monocolor screen | |
mono bold bold | |
mono underline underline | |
mono indicator reverse | |
mono error bold | |
# Index | |
color index red default "~A" # all messages | |
color index brightred default "~E" # expired messages | |
color index blue default "~N" # new messages | |
color index blue default "~O" # old messages | |
color index brightmagenta default "~Q" # messages that have been replied to | |
color index brightgreen default "~R" # read messages | |
color index blue default "~U" # unread messages | |
color index blue default "~U~$" # unread, unreferenced messages | |
color index brightyellow default "~v" # messages part of a collapsed thread | |
color index brightyellow default "~P" # messages from me | |
color index cyan default "~p!~F" # messages to me | |
color index cyan default "~N~p!~F" # new messages to me | |
color index cyan default "~U~p!~F" # unread messages to me | |
color index brightgreen default "~R~p!~F" # messages to me | |
color index red default "~F" # flagged messages | |
color index red default "~F~p" # flagged messages to me | |
color index red default "~N~F" # new flagged messages | |
color index red default "~N~F~p" # new flagged messages to me | |
color index red default "~U~F~p" # new flagged messages to me | |
color index black red "~D" # deleted messages | |
color index brightcyan default "~v~(!~N)" # collapsed thread with no unread | |
color index yellow default "~v~(~N)" # collapsed thread with some unread | |
color index green default "~N~v~(~N)" # collapsed thread with unread parent | |
color index red black "~v~(~F)!~N" # collapsed thread with flagged, no unread | |
color index yellow black "~v~(~F~N)" # collapsed thread with some unread & flagged | |
color index green black "~N~v~(~F~N)" # collapsed thread with unread parent & flagged | |
color index green black "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged | |
color index cyan black "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly | |
color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) | |
# Message Headers | |
color hdrdefault brightgreen default | |
color header blue default "^(From)" | |
color header blue default "^(Subject)" | |
# Body | |
color quoted blue default | |
color quoted1 cyan default | |
color quoted2 yellow default | |
color quoted3 red default | |
color quoted4 brightred default | |
color signature brightgreen default | |
color bold black default | |
color underline black default | |
color normal default default | |
# PGP | |
set pgp_sign_as = YOURKEYHERE | |
set crypt_use_gpgme=yes | |
set crypt_autosign=yes | |
set crypt_verify_sig=yes | |
set crypt_replysign=yes | |
set crypt_replyencrypt=yes | |
set crypt_replysignencrypted=yes | |
# This next line is an example of adding a custom header to your emails | |
# and should be adjusted, or removed, accordingly | |
my_hdr OpenPGP: url=http://acme.org/YOURKEY.ASC\; id=YOURKEY | |
color body red default "(BAD signature)" | |
color body cyan default "(Good signature)" | |
color body brightblack default "^gpg: Good signature .*" | |
color body brightyellow default "^gpg: " | |
color body brightyellow red "^gpg: BAD signature from.*" | |
mono body bold "^gpg: Good signature" | |
mono body bold "^gpg: BAD signature from.*" | |
# URL Regex | |
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" | |
# get the url view working | |
macro index \cb |urlview\n 'call urlview to extract URLs out of a message' | |
macro pager \cb |urlview\n 'call urlview to extract URLs out of a message' | |
# "h" will take you to the folder list in the index | |
macro index h "c?t" | |
# Dump all headers | |
macro index p "<display-toggle-weed> <print-message> <display-toggle-weed> <exit>" | |
macro pager p "<display-toggle-weed> <print-message> <display-toggle-weed>" | |
# Allow space characters in macros | |
bind editor <space> noop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment