forked from ecly/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.muttrc
155 lines (134 loc) · 6.18 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
# Folder hooks for multiple accounts
folder-hook 'mailboxrc' 'source ~/.config/mutt/mailboxrc'
folder-hook 'educationrc' 'source ~/.config/mutt/educationrc'
folder-hook 'companyrc' 'source ~/.config/mutt/companyrc'
folder-hook 'personalrc' 'source ~/.config/mutt/personalrc'
# Important config for live account
source "gpg -d ~/.config/mutt/.details.gpg |"
source "~/.config/mutt/mailboxrc" # Default account
source "~/.config/mutt/aliases"
source "~/.config/mutt/muttcol"
# Other settings
set editor ="nvim +13 -c 'set nobackup' -c 'set noswapfile' -c 'set nowritebackup' -c 'set tw=72 ft=mail noautoindent'"
set timeout = "10"
set mail_check = "10"
set mailcap_path = ~/.config/mutt/mailcap
set date_format="%m/%d %I:%M"
set index_format="%2C %Z %d %-15.15F %s (%-4.4c)"
set new_mail_command="sh ~/Scripts/mailnotify.sh %n %u&"
set wait_key = no
# Settings inspired by https://gist.github.com/bnagy/8914f712f689cc01c267
set hidden_host
set fast_reply # skip initial prompts when replying
set noallow_8bit # 8bit isn't safe via Demon.
set ascii_chars=yes # use ascii characters when displaying trees
set edit_headers= yes # Include headers in message for easy change
set nomark_old # Don't mark unread new msgs as old.
set nobeep # We don't need no beeping software.
set nostrict_threads # Lets have some fuzzy threading.
set noconfirmappend # Just append, don't hassle me (when moving mail)
set pager_stop # Don't skip msgs on next page.
set tilde # Fill out messages with '~'.
set include # Include the message in replies.
set fast_reply # skip initial prompts when replying
# unset record # don't save local copies of sent mail - only desirable for autosaves such as gmail
#
auto_view text/html
alternative_order text/plain text/enriched text/html
auto_view application/pdf
###-- General security settings---###
set ssl_force_tls=yes
set ssl_starttls=yes
set ssl_use_sslv2=no
set ssl_use_sslv3=no
set ssl_use_tlsv1=no
set ssl_use_tlsv1_1=no
set ssl_use_tlsv1_2=yes
set ssl_verify_dates=yes
set ssl_verify_host=yes
# Don't trust the system. First time always prompts for acceptance
unset ssl_usesystemcerts
set certificate_file=~/.config/mutt/certificates
###--- Mutt sorting ---###
set sort=threads
set sort_browser=date
set sort_aux=reverse-last-date-received
###--- Coloring ---###
mono bold bold
mono underline underline
mono indicator reverse
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.s'
color index_size green default
color normal default default
color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
###--- Bindings ---###
# Unbinds
bind generic,compose,attach,pager g noop
bind generic,compose,attach,pager,index d noop
#bind attach,browser,pager g noop
#bind attach,browser,index,pager d noop
# Don't ask - just move this Archived
macro index S ":set confirmappend=no delete=yes\n<tag-prefix><save-message>=Archived\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"
# Account changing
macro index <f1> '<sync-mailbox><refresh><enter-command>source ~/.config/mutt/mailboxrc<enter><change-folder>!<enter>'
macro index <f2> '<sync-mailbox><refresh><enter-command>source ~/.config/mutt/educationrc<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><refresh><enter-command>source ~/.config/mutt/companyrc<enter><change-folder>!<enter>'
macro index <f4> '<sync-mailbox><refresh><enter-command>source ~/.config/mutt/personalrc<enter><change-folder>!<enter>'
# Mailbox navigation
# --- Sourced --- #
# Use w3m for url view
# macro index,pager \cv |urlview\n
macro index,pager,attach,compose \cv "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message"
# Editor
bind editor ^T complete
bind editor <tab> complete-query
bind editor <space> noop
bind attach <space> view-mailcap
# Moving around
bind attach,browser,index gg first-entry
# bind attach,browser,index G last-entry - used go fetch
bind pager gg top
bind pager G bottom
bind pager k previous-line
bind pager j next-line
# Scrolling
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 browser,pager \Ce next-line
bind browser,pager \Cy previous-line
bind index \Ce next-line
bind index \Cy previous-line
# Threads
bind browser,pager,index N search-opposite
bind pager,index dT delete-thread
bind pager,index dt delete-subthread
bind pager,index gt next-thread
bind pager,index gT previous-thread
bind index za collapse-thread
bind index zA collapse-all # Missing :folddisable/foldenabl
# Index navigation
bind editor <space> noop
bind index \cd half-down
bind index \cu half-up
bind index dd delete-message
bind index U undelete-message
bind index F search
bind index R group-reply
bind index <up> previous-entry
bind index <down> next-entry
bind index <delete> delete-message
# bind index n next-entry / overrides next search item
bind index p previous-entry
macro index Q ":set quit=yes\nq" "Quit mutt without asking"
bind index C noop
bind index - collapse-thread
bind index _ collapse-all
macro index \cr "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "mark all messages read"
# Refreshing 'go fetch'
bind index G imap-fetch-mail