-
Notifications
You must be signed in to change notification settings - Fork 5
/
muttrc
187 lines (152 loc) · 5.48 KB
/
muttrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
set mbox_type = Maildir
set sendmail = /usr/bin/msmtp
set folder = ~/Mail/Gmail/
set spoolfile = "+INBOX"
set mbox = "+archive"
set postponed = "+drafts"
unset record
mailboxes \
"+INBOX" \
"+starred" \
"+task" \
"+CR" \
"+ML.wikitech-l" \
"+ML.mediawiki-l" \
"+ML.wmfall" \
"+ML.ops" \
"+ML.github" \
"+ML.debian-security" \
"+ML.debian-user" \
"+ML.debian-devel" \
"+ML.debian-bugs" \
"+ML.coreboot" \
"+ML.unicode" \
"+CI" \
"+pipelinebot" \
"+auto" \
"+sent" \
"+drafts" \
"+archive" \
"+spam" \
"+trash"
# main options
set realname = "Tyler Cipriani"
# set from = "[email protected]"
#
send-hook . "set from = [email protected]"
send-hook "~t @wikimedia.org" "set from = [email protected]"
send-hook "~t @lists.wikimedia.org" "set from = [email protected]"
set mail_check = 5
set envelope_from
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
# https://www.ietf.org/rfc/rfc2646.txt
# http://www.mdlerch.com/emailing-mutt-and-vim-advanced-config.html
set text_flowed
# sort/threading
set sort = threads
set sort_aux = reverse-date-received
# Too pedantic maybe
# set sort_re
# look and feel
set pager_index_lines = 8
set pager_context = 5
set pager_stop
set menu_scroll
set smart_wrap
set tilde
unset markers
set date_format="%y-%m-%d %T"
set status_format = "-%r- %f%?t? Tagged:%t?%?n? New:%n? -%>-"
# sidebar (requires patched mutt-sidebar)
set sidebar_visible = yes
set sidebar_width = 38
# set sidebar_delim='│'
set mail_check_stats=yes
set sidebar_visible=yes
set sidebar_format="%B%?F? [%F]?%* %?N?%N/?%S"
# set sidebar_format="%B%* %S%?N?(%N)?%?F?[%F]?"
set sidebar_indent_string=" "
set sidebar_folder_indent=yes
set sidebar_short_path=yes
# composing
set fcc_attach
unset mime_forward
set forward_format = "Fwd: %s"
set include
set forward_quote
ignore * # first, ignore all headers
unignore from: to: cc: date: subject: # then, show only these
hdr_order from: to: cc: date: subject: # and in this order
set beep_new # bell on new mail
# GPG sign
source ~/.mutt/gpgrc
set pgp_timeout = 3600 # how long to cache the pass-phrase
set crypt_autosign = yes # automatically sign all outgoing mail
set crypt_replyencrypt = yes # automatically encrypt replies to encrypted messages
set pgp_sign_as = 018FAC02 # my Key ID
set pgp_use_gpg_agent = yes
my_hdr X-PGP-Key: https://tylercipriani.com/018FAC02.asc
# color
source "$HOME/.mutt/colors"
source "$HOME/.mutt/subscribe"
# caching for faster search
set header_cache = "~/Mail/Cache"
set message_cachedir = "~/Mail/Cache"
# attachments
set mailcap_path = "~/.mutt/mailcap"
bind attach <return> view-mailcap
bind index,pager \CP sidebar-prev # Ctrl-Shift-P - Previous Mailbox
bind index,pager \CN sidebar-next # Ctrl-Shift-N - Next Mailbox
bind index,pager \CO sidebar-open # Ctrl-Shift-O - Open Highlighted Mailbox
# Fix backspce in urxvt
bind index,pager previous-line
# Contacts
set query_command="goobook query %s"
macro index,pager a \
"<pipe-message>goobook add<return>" "add sender to google contacts"
bind editor <Tab> complete-query
bind index,pager R group-reply
# Shortcuts
source "$HOME/.mutt/vim-keys.rc"
macro index ,t '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager ,t '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
macro pager ,u "|urlview<enter>" "call urlview to open links"
macro index gi "<change-folder>!<return>" "go to inbox"
macro index gs "<change-folder> =starred<return>" "go to starred"
macro index ,z "<shell-escape>offlineimap -q -o<return>" "sync IMAP"
macro pager ,g "|~/.mutt/view-web.py \
--trim '<>' --ltrim 'X-Gerrit-ChangeURL:' 'X-Gerrit-ChangeURL'<enter>" \
"Open gerrit link in browser"
macro pager ,p ":set pipe_decode<enter>|~/.mutt/view-web.py \
'https://phabricator.wikimedia.org/'<enter> \
:unset pipe_decode<enter>" \
"Open phab link in browser"
macro index <space> "<collapse-thread>" "uncollapse thread"
macro index ,r \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<pipe-message>notmuch-mutt -r thread<enter>\
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuch: reconstruct thread"
macro index ,s \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<shell-escape>notmuch-mutt -r --prompt search<enter>\
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuch: search mail"
macro pager ,v \
"<copy-message>/tmp/mutttmpbox\n<enter> \
<shell-escape>~/.mutt/view_html_email.py<enter>" \
"View HTML in browser"
macro pager ,l "|~/.mutt/unsub.py<enter>" \
"Find unsub header and open in browser"
macro index A "<save-message>=archive\n<sync-mailbox>"
# Sanely handle multi-part messages (prefer text part, but yield to
# mailcap-configured rendering for html-only)
# http://terminalmage.net/2014/03/16/how-i-read-html-email-with-mutt.html
alternative_order text/plain text/html
auto_view text/html