-
Notifications
You must be signed in to change notification settings - Fork 11
/
.muttrc
207 lines (190 loc) · 7.99 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# vim:ts=3:et:ft=muttrc
#
# mutt config
# joshua stein <[email protected]>
#
# things to set
set ascii_chars=no
set alias_file=~/.muttrc.aliases
set attach_format="%u%D%I %t%2n %T%.20d %> [%.7m/%.10M, %.6e%?C?, %C?, %s] "
set charset=utf-8
set confirmappend=no
set connect_timeout=3
set date_format="!%a, %d %b %Y at %H:%M:%S %Z"
set delete=yes
set display_filter="~/bin/mutt_filter"
set editor="vim"
set fast_reply=yes
set folder=~/Mail
set forward_format="fwd: %s"
set header_cache=~/.mutt-cache/
set hostname=localhost
set include=yes
set index_format="%[!%m%d] [%Z] %-52.52s %F"
set ispell="aspell --mode=email --add-email-quote=%,#,:,} --check"
set mail_check=60
set mark_old=no
set markers=no
set menu_context=1
set message_cache_clean=yes
set message_cachedir=~/.mutt-cache/
set metoo=no
set mime_forward=ask-no
set move=no
set narrow_tree=yes
set pager_context=2
set pager_stop=yes
set pager_format=" %f: %s"
set pipe_decode=yes
set postpone=ask-no
set print=ask-no
set quit=ask-yes
set read_inc=100
set reply_to=yes
set send_charset="utf-8:us-ascii"
set sendmail="msmtp"
set sidebar_delim_chars="/"
set sidebar_divider_char="│ "
set sidebar_format="%B%* %?N?(%N)?"
set sidebar_visible=yes
set sidebar_width=18
set smart_wrap=yes
set sort=threads
set status_format=" %h: %f (msgs:%?M?%M/?%m %l%?n? new:%n?%?o? old:%o?%?d? del:%d?%?F? flag:%F?%?t? tag:%t?%?p? post:%p?%?b? inc:%b?%?l??) %> %_v "
set status_on_top=yes
set tilde=yes
set timeout=15
set use_envelope_from=yes
set use_from
unset user_agent
# https://github.com/jcs/fastmail-ldap
set query_command="~/bin/fastmail-ldap.pl '%s'"
# things to bind keys to
bind attach <left> exit
bind pager <down> next-line
bind pager <up> previous-line
bind pager <left> exit
bind pager <right> next-entry
bind pager j next-line
bind pager k previous-line
bind pager l next-entry
bind pager K previous-entry
bind pager J next-entry
bind pager \CF next-page
bind pager \CB previous-page
bind pager \CP print-message
bind pager B sidebar-toggle-visible
bind index <down> next-entry
bind index j next-entry
bind index <up> previous-entry
bind index k previous-entry
bind index <delete> delete-message
bind index <space> display-message
bind index <right> display-message
bind index <tab> next-unread
bind index \C<tab> next-unread
bind index \CF next-page
bind index \CB previous-page
bind index B sidebar-toggle-visible
bind compose F edit-from
# always run $query_command when completing addresses instead of requiring C-t
bind editor <tab> complete-query
# act like normal vi keys but browse sidebar folders
macro index K "<enter-command>push <sidebar-prev><sidebar-open><enter>"
macro index J "<enter-command>push <sidebar-next><sidebar-open><enter>"
# things to automate
macro index,pager i "<change-folder>!<enter>" "go home"
macro index,pager n "<change-folder><enter>" "go to box with new mail"
macro index,pager p "<change-folder><up><up><enter>" "go back to the previous mailbox"
macro index D "<tag-pattern>~d >6m<enter><tag-prefix-cond><delete-message>" "delete old mail"
# do a one-time reply with sig on top, for e-mail chains where everyone else
# is doing annoying top-replying
macro index,pager R "<enter-command>set sig_on_top=yes<enter><reply><enter-command>set sig_on_top=no<enter>"
macro index,pager G "<enter-command>set sig_on_top=yes<enter><group-reply><enter-command>set sig_on_top=no<enter>"
# imitate the old search-body function, but expensive for imap
macro index <Esc>b "<search>~B " "search in message bodies"
# things to happen
folder-hook . set sort=threads # everything else
folder-hook . set strict_threads=no # compensate for stupid clients
folder-hook . set sort_aux=last-date-received # bumped threads appear new
folder-hook Sent set strict_threads=yes # don't group incorrectly
folder-hook Sent set sort=date-sent # when did i send that?
folder-hook allmail.* set sort=mailbox-order # don't sort, for fast loading
folder-hook allmail.* push <toggle-write> # don't save changes, read-only
# create message-ids that don't leak private info (like the number of messages
# sent in the current mutt session, or the local hostname)
send-hook . 'my_hdr Message-ID: <`date +"%Y%m%d%H%M%S"`.`sh -c "dd if=/dev/urandom bs=500 count=1 2>/dev/null | md5 | dd if=/dev/stdin bs=10 count=1 2>/dev/null"`@`sh -c "dd if=/dev/urandom bs=500 count=1 2>/dev/null | md5 | dd if=/dev/stdin bs=15 count=1 2>/dev/null"`>'
# things to display (or not)
ignore *
unignore from: resent-from: sender: reply-to: to: resent-to: cc: bcc: x-mailing-list: date: resent-date: organization: organisation: x-mailer: x-newsreader: x-agent: x-editor: user-agent: priority: importance: message-id: resent-message-id: subject: old-return-receipt-to: old-disposition-notification-to:
unhdr_order *
hdr_order from: resent-from: sender: reply-to: to: resent-to: cc: bcc: x-mailing-list: date: resent-date: organization: organisation: x-mailer: x-newsreader: x-agent: x-editor: user-agent: priority: importance: message-id: resent-message-id: old-return-receipt-to: old-disposition-notification-to: subject:
# bold/underline-only styling, for old non-color xterm (now xterm-r6 $TERM)
mono attachment bold
mono body underline "(https?|t?ftp|mailto|gopher|ssh|telnet|finger)://[^ ]+"
mono body underline "[-a-z_0-9.]+@[-a-z_0-9.]+[a-z]" # email addresses
mono body bold "-----Original Message-----"
mono body bold "[;:]-[)/(|]"
mono header none .
mono header bold "^From: "
mono header bold "^Resent-From: "
mono header bold "^To: "
mono header bold "^Subject: "
mono header bold "^Organi[zs]ation: "
mono header bold "^Priority: Urgent"
mono header bold "^Importance: high"
mono index bold '~U'
mono index bold '~F'
mono indicator reverse
mono signature bold
mono sidebar_new bold
mono tilde bold
mono tree bold
mono quoted bold
# since i now have to use an xterm-color $TERM, init color versions of the
# same using brightcolor16 as a bright black
color normal default default # init to black-on-white
color attachment brightdefault default
color body brightdefault default "(http|https|ftp|mailto|gopher|telnet|finger)://[^ ]+"
color body brightdefault default "[-a-z_0-9.]+@[-a-z_0-9.]+[a-z]"
color body brightdefault default "-----Original Message-----"
color body brightdefault default "[;:]-[)/(|]"
color header default default .
color header brightdefault default "^From: "
color header brightdefault default "^Resent-From: "
color header brightdefault default "^To: "
color header brightdefault default "^Subject: "
color header brightdefault default "^Organi[zs]ation: "
color header brightdefault default "^Priority: Urgent"
color header brightdefault default "^Importance: high"
color header brightdefault default '~U'
color header brightdefault default '~F'
color signature brightdefault default
color sidebar_new brightdefault default
color tilde brightblack default
color tree color242 default
color quoted brightblack default
# color flagged a dark red
color index brightcolor160 default '~F'
# color to-be-deleted as grayed out
color index brightblack default '~D'
# bold new email in the index
color index brightdefault default '~U'
# make huge messages stand out so i can avoid downloading them
color index brightcolor19 default '~z 500000-'
# things i can see in mutt (with external programs through ~/.mailcap)
auto_view application/pgp-encrypted
auto_view application/pgp-keys
auto_view application/pgp-signature
auto_view text/html # html with lynx
auto_view application/msword # .doc with antiword
auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document
auto_view application/x-tar-gz
auto_view application/x-zip-compressed
auto_view application/zip
# but that doesn't mean i don't like text/plain
alternative_order text/plain text/html
# things to load in
source ~/.muttrc.personal # my personal stuff
source ~/.muttrc.lists # mailboxes, folders
source $alias_file # for tab completion