-
Notifications
You must be signed in to change notification settings - Fork 2
/
muttrc
312 lines (286 loc) · 13.2 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
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
# vim: filetype=muttrc
# This is the general mutt config which has the settings that all accounts use.
bind index,pager i noop
bind index,pager g noop
bind index,pager , noop #for switching mailboxes
bind index,pager . noop #for tags
bind index \Cf noop
source ~/dotfiles/muttcol
set alias_file = ~/dotfiles.private/muttaliases
source ~/dotfiles.private/muttaliases
source ~/dotfiles.private/personal.muttrc
set sleep_time = 0
set sort = threads
set sort_aux = 'reverse-date'
set editor = $EDITOR
#set copy = no
set timeout = "5"
set mail_check = "10"
set mailcap_path = ~/dotfiles/mailcap
set date_format="!%y-%m-%d %I:%M"
#set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
set markers = no
set mark_old = no
set mime_forward = yes
#set smtp_authenticators = 'gssapi:login'
set wait_key = no
set pager_index_lines = 7
set pager_context = 10
set recall = ask-no
set edit_headers
set narrow_tree
auto_view text/html
auto_view application/pgp-encrypted
auto_view text/calendar application/ics
alternative_order text/plain text/enriched text/html
set rfc2047_parameters = yes
set send_charset = "utf-8"
# headers to show
ignore * # ignore all headers
unignore from: to: cc: date: subject: # show only these
hdr_order from: to: cc: date: subject: # and in this order
set to_chars = " »›-‹L"
#set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
set sidebar_sort_method = 'unsorted'
#set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
#set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %b %d ]>&%[%b %d]>&%[%b %d, %Y]> %-25.25L %?E?%2.e/%2.E&? %g %s'
#set index_format='%4C %Z %<[y?%<[m?%<[d?%10[ %H:%M ]&%10[%a %b %d ]>&%12[%b %d ]>&%10[%b %d, %Y]> %-20.20L %?E?%2.e/%2.E& ? %g %?GI?%GI &?%?GL?%GL &?%?Gt?%Gt &?%?Gr?%Gr &?%?GW?%GW &? %s'
#set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %b %d ]>&%[%b %d]>&%[%b %d, %Y]> %-25.25L %?E?%2.e/%2.E& ? %?Gi?%Gi &?%?Gl?%Gl &?%?Gn?%Gn &?%?Gg?%Gg &?%?Gw ?%Gw &?%?GI?%GI &?%?GL?%GL &?%?Gf?%Gf &?%?Gp?%Gp &?%?Gu?%Gu &?%?Gt?%Gt &?%?Gr?%Gr &?%?GW?%GW &? %s'
#set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %b %d ]>&%[%b %d]>&%[%b %d, %Y]> %-25.25L %?E?%2.e/%2.E& ? %?Gi?%Gi &?%?Gl?%Gl &?%?Gn?%Gn &?%?Gg?%Gg &?%?Gw ?%Gw &?%?GI?%GI &?%?GL?%GL &?%?Gf?%Gf &?%?Gp?%Gp &?%?Gu?%Gu &?%?Gt?%Gt &?%?Gr?%Gr &?%?GW?%GW &? %s'
#set index_format='%4C %Z %<[y?%<[m?%<[d?%10[ %H:%M ]&%10[%a %b %d ]>&%12[%b %d ]>&%10[%b %d, %Y]> %-20.20L %?E?%2.e/%2.E& ? %g %?GI?%GI &?%?GL?%GL &?%?Gt?%Gt &?%?Gr?%Gr &?%?GW?%GW &? %s'
set index_format='%4C %Z %<[y?%<[m?%<[d?%10[ %H:%M ]&%10[%a %b %d ]>&%12[%b %d ]>&%10[%b %d, %Y]> %-20.20L %?E?%2.e/%2.E& ? %?Gi?%Gi&? %?GS?%GS&?%?Gt?%Gt&?%?Gr?%Gr&?%?GI?%GI&?%?GL?%GL&?%?Gl?%Gl&?%?GD?%GD&?%?Gk?%Gk&?%?Gc?%Gc&?%?Gp?%Gp&?%?Gw?%Gw&?%?G4?%G4&?%?Gv?%Gv&?%?Gpsi?%Gpsi&?%?G5?%G5&?%?G6?%G6&?%?Gf?%Gf&?%?Gn?%Gn&?%?GN?%GN&?%?Gu?%Gu&?%?Gy?%Gy&?%?GP?%GP&?%?Gh?%Gh&?%?GF?%GF&?%?G2?%G2&?%?GC?%GC&?%?G9?%G9&?%?G8?%G8&?%?G7?%G7&?%?GT?%GT&?%?GM?%GM&?%?GX?%GX&?%?G0?%G0&?%?Gg?%Gg&?%?Gs?%Gs&?%?Ge?%Ge&?%?G@?%G@&?%?GA?%GA&?%?GR?%GR&?%?Gq?%Gq&?%?Gx?%Gx&? %s'
set pager_format = '-%Z- %e/%E: %-20.20n %25.25s%* %g (%P)'
#
# The default index_format is:
# '%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s'
#
# We replace the date field '%{%b %d}', giving:
#set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> %-25.25L (%e/%E) %?Gi?%Gi &?%?Gw ?%Gw &?%?Gf?%Gf &?%?Gp?%Gp &?%?Gu?%Gu & ? %s'
# Test Date Range Format String Example
# --------------------------------------------
# %[d Today %[%H:%M ] 12:34
# %[m This month %[%a %d] Thu 12
# %[y This year %[%b %d] Dec 10
# — Older %[%m/%y ] 06/15
#
#
#
set crypt_use_gpgme = yes
set crypt_verify_sig = no
set pgp_auto_decode = yes
# General remappings
bind editor <space> noop
bind index G last-entry
bind index gg first-entry
bind pager j next-line
bind pager k previous-line
bind pager gg top
bind pager G bottom
bind index d half-down
bind index u half-up
bind index D delete-message
bind index U undelete-message
bind index,pager R group-reply
bind index,pager \031 previous-undeleted # Mouse wheel
bind index,pager \005 next-undeleted # Mouse wheel
macro index,pager S <sync-mailbox>
# neomutt with notmuch
# open a different virtual folder
bind index,pager X change-vfolder
# read entire thread of the current message
bind index,pager + entire-thread
# generate virtual folder from query
bind index,pager \eX vfolder-from-query
# generate virtual folder from query with time window
bind index < vfolder-window-backward
bind index > vfolder-window-forward
# View attachments properly.
bind attach <return> view-mailcap
set fast_reply # skip to compose when replying
set fcc_attach # save attachments with the body
unset mime_forward # forward attachments as part of body
set forward_format = "Fwd: %s" # format of subject when forwarding
set forward_decode # decode when forwarding
set forward_quote # include message in forwards
set include # include message in replies
set attach_save_dir = "/nettmp"
#Ctrl-R to mark all as read
#macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
#sync email
#macro index O "<shell-escape>$HOME/.config/mutt/etc/mailsync.sh<enter>" "run offlineimap to sync all mail"
#macro index o "<shell-escape>$HOME/.config/mutt/etc/mailsync.sh -qf INBOX<enter>" "run offlineimap to sync inbox"
#copy/move dialogs
#macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
#macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
macro index,pager,attach ,p "|cat > /nettmp/patch\n" "copy a message as patch"
macro attach ,c "|cat > /nettmp/ical; todo.sh cal import --editmenu /nettmp/ical\ncalcurse --import /nettmp/ical\necho \"imported in calendar\"" "import in calendar"
macro index,pager,attach ,v "|cat > ~/.vbuf\n" "copy to ~/.vbuf"
macro index,pager,attach ,h "|cat > /nettmp/mail.html" "copy to /nettmp/mail.html"
# Notmuch searching
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
macro index ,A "<limit>all\n" "show all messages (undo limit)"
# Sidebar mappings
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats = yes
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev
bind index,pager \Cn sidebar-next
bind index,pager B sidebar-toggle-visible
#
# 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 even more up.
set header_cache = ~/.cache/mutt
bind index <esc>L limit-current-thread
# This variable specifies private notmuch tags which should not be printed
# on screen (index, pager).
#set nm_hidden_tags = "unread,draft,flagged,passed,replied,attachment"
set nm_record = "yes"
set nm_record_tags = "-inbox,sent"
set nm_unread_tag = "unread"
set abort_noattach = ask-yes
# Search for the following regular expression in the body of the email
set abort_noattach_regex = "\\<attachments?|attached|bijlagen?|bijgevoegd)\\>"
macro index \\ "<vfolder-from-query>"
macro index,pager ./ "<shell-escape>$HOME/bin/updatemail.sh<enter>"
macro index \eg "<shell-escape>$HOME/bin/updatemail-quick.sh<enter>"
bind index,pager \eA create-alias
bind index,pager a noop
bind pager h exit
bind pager l exit
bind index - collapse-thread
bind pager H display-toggle-weed
bind index y noop
bind pager <Up> previous-line
bind pager <Down> next-line
macro index,pager a "<modify-labels-then-hide>-inbox,-unread\n<sync-mailbox>"
macro index,pager A ";<modify-labels-then-hide>-inbox,-unread\n<sync-mailbox>"
macro index,pager S ";<modify-labels-then-hide>-inbox,-unread,+spam,+killed\n<sync-mailbox>"
macro index,pager M ":source ~/dotfiles/muttfzf.sh|<enter>"
# modify (notmuch/imap) tags
bind index,pager .l modify-labels
macro index,pager .L ";<modify-labels>"
# toggle (notmuch/imap) tag non-interactively.
macro index,pager .a "<modify-labels>!inbox\n"
macro index,pager .t "<modify-labels>!todo\n"
macro index,pager .y "<modify-labels>!reply\n"
macro index,pager .r "<modify-labels>!reply\n"
macro index,pager .w "<modify-labels>!waiting\n"
macro index,pager .W "<modify-labels>!work\n"
macro index,pager .p "<modify-labels>!personal\n"
macro index,pager .i "<modify-labels>!interesting\n"
macro index,pager .0 "<modify-labels>!lowpriority\n"
#single message version, S is preferred:
macro index,pager .j "<modify-labels>-inbox,-unread,+spam,+killed\n"
macro index,pager ,0 "<vfolder-from-query>date:2M.. and tag:unread and NOT tag:killed and NOT tag:spam\n<collapse-all>\n"
macro index,pager ,\' "<vfolder-from-query>date:2M.. and tag:unread and NOT tag:killed and NOT tag:spam\n<collapse-all>\n"
macro index,pager ,1 "<change-vfolder>INBOX\n<collapse-all>\n"
macro index,pager ,2 "<vfolder-from-query>NOT tag:killed\n<collapse-all>\n"
macro index,pager ,a "<vfolder-from-query>NOT tag:killed\n<collapse-all>\n"
macro index,pager ,i "<change-vfolder>INBOX\n<collapse-all>\n"
macro index,pager ,s "<change-vfolder>sent\n<collapse-all>\n"
macro index,pager ,3 "<vfolder-from-query>tag:inbox AND tag:work\n<collapse-all>n"
macro index,pager ,4 "<vfolder-from-query>tag:inbox AND not tag:work and not tag:sxmo\n<collapse-all>\n"
macro index,pager ,5 "<vfolder-from-query>tag:inbox and tag:sxmo\n<collapse-all>\n"
macro index,pager ,r "<vfolder-from-query>tag:inbox AND tag:reply\n"
macro index,pager ,y "<vfolder-from-query>tag:inbox AND tag:reply\n"
macro index,pager ,t "<vfolder-from-query>tag:inbox AND tag:todo\n"
macro index,pager ,w "<vfolder-from-query>tag:inbox AND tag:waiting\n"
macro index,pager ,c "<vfolder-from-query>tag:inbox AND (mimetype:text/calendar OR mimetype:application/ics)\n"
macro index,pager ,C "<vfolder-from-query>mimetype:text/calendar OR mimetype:application/ics\n"
macro index,pager ,6 "<vfolder-from-query>tag:spam\n"
# Replace some tags with icons
# tag-transforms tag transformed-string { tag transformed-string ...}
tag-transforms "inbox" "📥" \
"unread" "📧" \
"replied" "💬" \
"reply" "🔄reply" \
"todo" "⏳todo" \
"interesting" "💡" \
"sent" "👉" \
"spam" "🗑" \
"deleted" "❌" \
"killed" "❌" \
"calendar" "📆" \
"signed" "🔑" \
"encrypted" "🔒" \
"attachment" "📎" \
"not" "📯" \
"errnot" "📣" \
"work" "💼" \
"personal" "👤" \
"familie" "👪" \
"lists" "📜" \
"github" "" \
"patch" "" \
"debian" "" \
"ubuntu" "" \
"rust" "🦀" \
"frog" "🐸" \
"folia" "🥬" \
"flat" "🥬" \
"ci" "🤖" \
"sysadmin" "🎠" \
"homeautomation" "🏡" \
"lamachine" "🦙" \
"university" "🎓" \
"finances" "💰" \
"psi" "🔱" \
"administrative" "📊" \
"politics" "🕊"\
"clam" "🐚" \
"sxmo" "📱" \
"suckless" "" \
"applied" "✅" \
"rejected" "❌" \
"superseded" "⚱" \
"needsrevision" "🎗"
#The formats must start with 'G' and the entire sequence is case sensitive.
#tag-formats tag format-string { tag format-string ...}
tag-formats "inbox" "Gi" \
"sent" "GS" \
"todo" "Gt" \
"reply" "Gr" \
"interesting" "GI" \
"lowpriority" "GL" \
"lists" "Gl" \
"deleted" "GD" \
"killed" "Gk" \
"calendar" "Gc" \
"personal" "Gp" \
"work" "Gw" \
"finances" "G4" \
"university" "Gv" \
"psi" "Gpsi" \
"politics" "G5" \
"administrative" "G6" \
"familie" "Gf" \
"not" "Gn" \
"errnot" "GN" \
"unilang" "Gu" \
"sysadmin" "Gy" \
"patch" "GP" \
"homeautomation" "Gh" \
"frog" "GF" \
"folia" "G2" \
"clam" "GC" \
"rust" "G9" \
"debian" "G8" \
"ubuntu" "G7" \
"ci" "GT" \
"lamachine" "GM" \
"sxmo" "GX" \
"suckless" "G0" \
"github" "Gg" \
"signed" "Gs" \
"encrypted" "Ge" \
"attachment" "G@" \
"applied" "GA" \
"rejected" "GR" \
"superseded" "Gq" \
"needsrevision" "Gx"