aboutsummaryrefslogtreecommitdiffstats
path: root/.mutt/.muttrc
blob: 260fd0acc61f27a98cedd2634b3098314faf1e2b (plain) (blame)
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# vim: filetype=neomuttrc
set mailcap_path= $HOME/.mutt/mailcap
set allow_ansi
set smart_wrap
set imap_keepalive = 900
set timeout = 300
set mail_check = 60
set move = no
# need cyrus-sasl-module to work
set ssl_starttls=yes
set ssl_force_tls=yes

# crypto options for autosigning and autoencrypting
set crypt_autopgp=yes
set crypt_autosign=yes

set crypt_opportunistic_encrypt=yes
set crypt_opportunistic_encrypt_strong_keys=yes

set crypt_protected_headers_read=yes
set crypt_protected_headers_subject=yes
set crypt_protected_headers_write=yes

set crypt_reply_encrypt=yes
set crypt_reply_sign=yes
set crypt_reply_sign_encrypted=yes
set crypt_timestamp=yes

unset sig_dashes

set ask_bcc = yes
set ask_cc = yes

set signature = "~/.mutt/.signature"

folder-hook 'account.gmail' 'source ~/.mutt/account.gmail'
folder-hook 'account.self' 'source ~/.mutt/account.self'
folder-hook 'account.zoho' 'source ~/.mutt/account.zoho'

# default account
source ~/.mutt/account.self
# source ~/.mutt/account.gmail

macro index,pager <f2> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.self<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.gmail<enter><change-folder>!<enter>'
macro index,pager <f4> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.zoho<enter><change-folder>!<enter>'

# macros
macro index A "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>” “mark all messages read"

set new_mail_command="notify-send.sh 'New Email' '%n new messages, %u unread.' &"

# gives us all the mailboxes in the sidebar
set imap_check_subscribed

set editor = "vim"

# folder-hook gmail/important "color status J_black color136"
#set imap_list_subscribed=yes
set dsn_notify="failure,delay"
set dsn_return="hdrs"

set sidebar_visible = yes
set mail_check_stats = yes
set sidebar_divider_char = ' |'
set sidebar_width = 40
set sidebar_short_path = yes
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_folder_indent = yes
set sidebar_indent_string = "...."

#subscriptions
subscribe -group llvm-cfre cfe-dev@lists.llvm.org$
subscribe -group llvm-llvm llvm-dev@lists.llvm.org$
subscribe -group lua lua-l@lists.lua.org
subscribe -group cygwin cygwin@cygwin.com
subscribe -group dpdk dev-request@dpdk.org$
subscribe -group freeradius freeradius-users-request@lists.freeradius.org$
subscribe -group odp odp-request@lists.opendataplane.org$

color error         color196        default                        # message line error text
color tilde         color81         default                        # vi-like tildes marking blank lines
color message       color82         default
color markers       color210 default                        # wrapped-line /^\+/ markers
color attachment    color141  default                        # attachment headers
color search        color232        color154                        # search patterns in pager
color indicator     brightcolor232  color33                        # selected email in index
color tree          color141  default                        # arrow in threads (`-->')

# basic monochrome screen
mono bold           bold
mono underline      underline
mono indicator      reverse
mono error          bold
mono header         bold                            "^(From|Subject|Date|To|Cc|Bcc):"
mono quoted         bold

# index ----------------------------------------------------------------

color index         color160        default        "~A"            # all messages
color index         color166        default        "~E"            # expired messages
color index         color28         default        "~N"            # new messages
color index         color22         default        "~O"            # old messages
color index         color244        default        "~R"            # read messages
color index         color38         default        "~Q"            # messages that have been replied to
color index         color31         default        "~U"            # unread messages
color index         color29         default        "~U~$"          # unread, unreferenced messages
color index         color222        default        "~v"            # messages part of a collapsed thread
color index         color222        default        "~P"            # messages from me
color index         color39         default        "~p!~F"        # messages to me
color index         color39         default        "~N~p!~F"      # new messages to me
color index         color39         default        "~U~p!~F"      # unread messages to me
color index         color244        default        "~R~p!~F"      # messages to me
color index         brightcolor165  default        "~F"            # flagged messages
color index         brightcolor165  default        "~F~p"          # flagged messages to me
color index         brightcolor165  default        "~N~F"          # new flagged messages
color index         brightcolor165  default        "~N~F~p"        # new flagged messages to me
color index         brightcolor165  default        "~U~F~p"        # new flagged messages to me
color index         color232        color196        "!~N ~D"        # deleted messages
color index         color232        color196        "~N ~D"         # deleted new messages
color index         color244        default        "~v~(!~N)"      # collapsed thread with no unread
color index         color81         default        "~v~(~N)"       # collapsed thread with some unread
color index         color81         default        "~N~v~(~N)"     # collapsed thread with unread parent
# statusbg used to indicated flagged when foreground color shows other status
# for collapsed thread
color index         color160        default        "~v~(~F)!~N"    # collapsed thread with flagged, no unread
color index         color81         default        "~v~(~F~N)"     # collapsed thread with some unread & flagged
color index         color81         default        "~N~v~(~F~N)"   # collapsed thread with unread parent & flagged
color index         color81         default        "~N~v~(~F)"     # collapsed thread with unread parent, no unread inside, but some flagged
color index         color39         default        "~v~(~p)"       # collapsed thread with unread parent, no unread inside, some to me directly
color index         color81         color160        "~v~(~D)"       # thread with deleted (doesn't differentiate between all or partial)
color index         color222        default        "~T"            # tagged messages
color index         brightcolor222  default        "~T~F"          # tagged, flagged messages
color index         brightcolor222  default        "~T~N"          # tagged, new messages
color index         brightcolor222  default        "~T~U"          # tagged, unread messages

color index         color167             default         "~D(!~p|~p)"               # deleted
color index         color111        default         "~F"                         # flagged
color index         color167       default         "~="                         # duplicate messages
color index         color22         default         "~A!~N!~T!~p!~Q!~F!~D!~P"  # the rest
color index         brightgreen     default         "~A~N!~T!~p!~Q!~F!~D"      # the rest, new
color index         black           color167             "~D"                        # deleted messages
color index         yellow          default         "~(~N)"                    # messages in threads with some unread
color index         green           default         "~S"                       # superseded messages
color index         yellow          default         "~T"                       # tagged messages
color index         color167       default             "~="                       # duplicated messages

# message headers ------------------------------------------------------

# gives us all the cool email headers
unignore *
# color the line containing the match, not just the match
set header_color_partial=no
color hdrdefault    default         default
color header        color69         default        "^ARC-"
color header        color25         default        "^Received"
color header        color30         default        "^X-"
color header        color131        default        "^Message-ID"
color header        color66         default        "^Return-Path"
color header        color167        default        "^Reply-To"
color header        color36         default        "^List-"
color header        color63         default        "^MIME-"
color header        color99         default        "^Content.*"
color header        color209        default        "^DKIM"
color header        color132        default        "^Authentication"
color header        color131        default        "^User-Agent"
color header        color27         default        "^(To|Cc|Bcc)"
color header        color28         default        "^(From)"
color header        color6          default        "^(Date)"
color header        color22         default        "^(Subject)"

# body -----------------------------------------------------------------

color quoted        color39         default
color quoted1       color165        default
color quoted2       color35         default
color quoted3       color222        default
color quoted4       color166        default
color quoted5       color108        default
color quoted6       color105        default
color quoted7       color100        default
color quoted8       color39         default
color quoted9       color31         default
color signature     color81         default                        # everything below /^--\s*$/

color bold          color255        default
color underline     color208        default
color normal        color244        default

## pgp
color body          color131        default        "^(Message-ID|Message-Id).*"
color body          color132        default        "^Authentication-.*"
color body          color25         default        "^Received:.*"
color body          color25         default        "^Received-.*"
color body          color209        default        "^DKIM-.*"
color body          color69         default        "^ARC-.*"
color body          color36         default        "^List-.*"
color body          color63         default        "^(MIME|Mime)-.*"
color body          color99         default        "^Content-.*"
color body          color30         default        "^X-.*"
color body          color160        default        "(BAD signature)"
color body          color39         default        "(Good signature)"
color body          color39         default        "^gpg: Good signature .*"
color body          color241        default        "^gpg: "
color body          color241        color160        "^gpg: BAD signature from.*"
color body          color30         default         "^# \.*"
color body          color31         default         "^## \.*"
color body          color32         default         "^### \.*"
color body          color33         default         "^#### \.*"
color body          color29         default         "^(\t| )*(-|\\*) \.*"
mono  body          bold                            "^gpg: Good signature"
mono  body          bold                            "^gpg: BAD signature from.*"

# yes, an insane URL regex
color body          brightcolor39   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<>\"]"
# and a heavy handed email regex
color body          brightcolor39   default        "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"

set display_filter="perl -0777pe 's/___{10,}[^_]*microsoft teams meeting.*to join the meeting<([^>]*).*(___{10,})/\\n────────────────────────────────────────────────────────────────────────\\n\\nTeams Meeting ~~\\n\\nMeeting URL:\\n$1\\n\\n────────────────────────────────────────────────────────────────────────/is'| sed 's/^\\(To\\|CC\\): \\([^<]*[^>]\\)$/\\1\:<\\2>/g' | perl -0777pe 's/(((?!.*CC:)To:|CC:).+?(?=>\\n)>)/$1!REMOVE_ME!\\n!END!/gs' | sed '/^To:/{;:l N;/!END!/b; s/\\(\\n\\|  *\\|\\t\\t*\\)/ /g; bl}' | sed '/^To:/,/>$/ s/\\([^>]*>,\\?\\)/\\1\\n/g' | sed -e 's/^ \\(CC:\\)\\(.*$\\)/\\1\\n\\2/' -e 's/^\\(To:\\)\\(.*$\\)/\\1 --------------------------------------------------------------------\\n\\2/' -e 's/^!END!$/------------------------------------------------------------------------/' -e '/!REMOVE_ME!/d' -e '/\\[-- Type: text.* --\\]/d' -e '/\\[-- Autoview.* --\\]/d' -e '/\\[-- Type.* --\\]/d' -e '/\\[-- .*unsupported.* --\\]/d' -e '/\\[-- Attachment #[0-9] --\\]/d' -e 's/Attachment #[0-9]: //g' -e '/./,/^$/!d' -e 's/\\([A-Z]*\\), *\\([A-Za-z]*\\)\\(\"\\)\\?/\\2 \\L\\u\\1\\E\\3/g'"

# simplified regex for URL & email
#color body		magenta		default	"(ftp|https?|gopher|news|telnet|finger)://[^ \"\t\r\n]+"
#color body		magenta		default	"[-a-z_0-9.]+@[-a-z_0-9.]+"

#highlight the mail subject and from in the body as well
color body color28 default "(^Subject:.*$)"
color body color27 default "(^From:.*$)"

# _underline_
color body          blue            default         "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
mono  body          underline                       "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
# /italic/  (Sometimes gets directory names)
color body         blue            default         "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
mono body          underline                       "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"

# Color if the attachment is autoviewed
color   attach_headers     brightgreen     default        "Autoview"

# Color only the brackets around the headers
color   attach_headers     brightyellow    default        "^\\[--"
color   attach_headers     brightyellow    default        "--]$"

# Color the mime type and the size
color   attach_headers     green           default        "Type: [a-z]+/[a-z0-9\-]+"
color   attach_headers     green           default        "Size: [0-9\.]+[KM]"

# Color GPGME signature checks
# color   attach_headers     brightgreen     default        "Good signature from.*"
# color   attach_headers     brightred       default        "Bad signature from.*"
# color   attach_headers     brightred       default        "BAD signature from.*"
# color   attach_headers     brightred       default        "Note: This key has expired!"
# color   attach_headers     brightmagenta   default        "Problem signature from.*"
# color   attach_headers     brightmagenta   default        "WARNING: This key is not certified with a trusted signature!"
# color   attach_headers     brightmagenta   default        "         There is no indication that the signature belongs to the owner."
# color   attach_headers     brightmagenta   default        "can't handle these multiple signatures"
# color   attach_headers     brightmagenta   default        "signature verification suppressed"
# color   attach_headers     brightmagenta   default        "invalid node with packet of type"
###
color index_collapsed blue default
color index_date color31  default
color index_label color196 default
color index_number color63 default
color index_size color37 default
color index_tags color27 default
#color index_subject color166 default
#color index_tag color165 default
###
color prompt blue default

color sidebar_divider brightcolor39 default
color sidebar_flagged color167 default
color sidebar_highlight color28 default
color sidebar_indicator cyan default
color sidebar_new color24 default
color sidebar_ordinary color25 default
color sidebar_spoolfile color38 default
color sidebar_unread  color99 default

color progress white blue
color index_flags default color30 '~F'
# vi: ft=muttrc ts=4 sw=4 sts=4 et
set status_format='-%r-%D %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? \
Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---%v'
set index_format='%4C %D %Z %{%b %d} %H %-15.15L (%?l?%4l&%4c?) %s | To:%L'
set sort=threads
set sort_aux=last-date-received
color status color39 default
# color status        color210  color39
color status color25 white '(New|Del|Flag):[0-9]+'
color status color25 default '\([^)]+/[^)]+\)'
color status default default '\(threads/last-date-received\)'
color status color30 default '\[([^]]+)\]' 1
color status brightwhite default 'NeoMutt: ([^ ]+)' 1

auto_view  text/html

#set pager_index_lines=10

bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
bind index l display-message
bind browser l select-entry
bind index h noop
bind browser h goto-parent
bind browser gg top-page
bind pager g noop
bind pager gg top
bind pager G bottom
bind index g noop
bind index gg first-entry
bind browser G bottom-page
bind index G last-entry
bind index D delete-message
bind index U undelete-message
bind index,pager R group-reply
bind attach,browser,pager,index \CF next-page
bind attach,browser,pager,index \CB previous-page
bind attach,browser,pager,index \Cu half-up
bind attach,browser,pager,index \Cd half-down
bind index H top-page
bind index M middle-page
bind index L bottom-page

# color   body    brightwhite     default         "^[[:space:]].*"
# color   body    yellow          default         "^(diff).*"
color   body    red           default         "^[\-\-\-].*"
color   body    green           default         "^[\+\+\+].*"
color   body    green           default         "^[\+].*"
color   body    red             default         "^[\-].*"
color   body    blue      default         "^[@@].*"
# color   body    brightwhite     default         "^(\s).*"
# color   body    cyan            default         "^(Signed-off-by).*"
# color   body    cyan            default         "^(Docker-DCO-1.1-Signed-off-by).*"
# color   body    brightwhite     default         "^(Cc)"
# color   body    yellow          default         "^diff \-.*"
# color   body    brightwhite     default         "^index [a-f0-9].*"
# color   body    brightblue      default         "^---$"
color   body    red           default         "^\-\-\- .*"
color   body    green           default         "^[\+]{3} .*"
color   body    green           default         "^[\+][^\+]+.*"
color   body    red             default         "^\-[^\-]+.*"
color   body    blue      default         "^@@ .*"
# color   body    green           default         "LGTM"
# color   body    brightmagenta   default         "-- Commit Summary --"
# color   body    brightmagenta   default         "-- File Changes --"
# color   body    brightmagenta   default         "-- Patch Links --"
# color   body    green           default         "^Merged #.*"
# color   body    red             default         "^Closed #.*"
# color   body    brightblue      default         "^Reply to this email.*"