aboutsummaryrefslogtreecommitdiffhomepage
path: root/mutt/default
blob: b40cecfcba410fff37c46a6ee0a93434fc5a0e50 (plain)
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
# Edit rc file and source it. This is the most important thing
macro index,browser,attach \Cv ":set wait_key=no<Return>!$EDITOR ~/.config/mutt/muttrc<Return>:source ~/.config/mutt/muttrc<Return>:set wait_key=yes<Return>"

# Connection options
set ssl_force_tls = yes
unset ssl_starttls

# Default settings
set header_cache = ~/.cache/mutt
set message_cachedir = ~/.cache/mutt.message
set edit_headers = yes
set mailcap_path = ~/.config/mutt/mailcap

# This allows to reply with "To: " in header
set reverse_name = yes
set reverse_realname = yes
alternates = @topo.tw

# Interface
set charset = "utf-8"
set send_charset = "us-ascii:utf-8"
set header = no
set pager_stop
set sleep_time = 0 # When changing folder
set timeout = 10
set quit = ask-no
set delete = yes
set sort = reverse-threads
set my_keep_lines1 = 0
set my_keep_lines2 = 12
set pager_index_lines = $my_keep_lines1
set markers = no # Remove '+' for long links with limited terminal width
# set reply_with_xorig = true
set text_flowed = yes

# Index format
#set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s"
#set index_format = "%Z %(%g.%m.%d) %-16.16L (%4c) %s"
set index_format="%4C %7@date@ %-15.15F %Z (%4c) %s"
index-format-hook  date  "~d<1d"    "%[%H:%M]"
index-format-hook  date  "~d<1w"    "%[%a]"
index-format-hook  date  "~d<1y"    "%[%b %d]"
index-format-hook  date  "~A"       "%[%Y-%m]"

# Preference
alternative_order text/html text/plain text/enriched
# Auto convert text/html MIME type to text/plain
auto_view text/html
# Macro to open html with css
macro pager l "v/(html|zip)<Return>xq<Return>" "Open html file"

# Vim-style key binding, \c means Ctrl
macro index,pager c '<change-folder>='
macro index q '<change-folder>?'
bind attach g exit
bind index o sort-reverse
bind index O sort-mailbox
bind index,pager <Return> sync-mailbox
bind index x tag-entry
bind index y edit-label
bind index t edit-label
bind index,browser l select-entry
bind browser h descend-directory
bind index \\ limit
bind index \cj next-entry
bind index \ck previous-entry
bind pager \ce next-line
bind pager \cy previous-line
bind index,browser G last-entry
bind index,browser g noop
bind index,browser gg first-entry
bind index,pager,browser,attach \cf next-page
bind index,pager,browser,attach \cb previous-page
bind index,pager,browser,attach \cd half-down
bind index,pager,browser,attach \cu half-up
bind index,pager <BackTab> previous-new-then-unread
bind index,pager <Tab> next-new-then-unread
bind index } bottom-page
bind index p parent-message
bind index P print-message
bind pager G bottom
bind pager j next-line
bind pager k previous-line
bind pager \cn next-entry
bind pager \cp previous-entry
bind pager \ch display-toggle-weed
macro index <Space> "Wn"
macro browser \cp "q\cp"
macro browser \cn "q\cn"
macro index,browser,pager i ':toggle sidebar_new_mail_only<enter>'
bind pager h skip-headers
bind attach x view-mailcap
macro generic,index,pager \cr ":source ~/.config/mutt/muttrc<Return>" "Reload mutt's configuration file"
macro index <Return> ":exec sync-mailbox\n" "Sync Mailbox"
macro index *a "Tall\n" "Select All"
macro index \ca "Tall\n" "Select All"
macro index *n "\ctall\n" "Deselect All"
macro index h "\\all\n" "All messages"
macro index d '<tag-prefix><delete-message>' 'Delete'
macro index s '<tag-prefix><save-message>' 'Saved'
macro index W '<tag-prefix><clear-flag>' 'Clear flag'
macro index w '<tag-prefix><set-flag>' 'Set flag'
macro pager x ':set my_keep_lines1 = $my_keep_lines2<enter>:set my_keep_lines2 = $pager_index_lines<enter>:set pager_index_lines = $my_keep_lines1<enter>'
macro pager z '|xsel -ib<Return>' "Copy pager content into clipboard"
macro index I  "<search>~F\n"   "Search for next important"
macro pager U "\
:set my_tmp_pipe_decode=\$pipe_decode\n\
:set pipe_decode\n\
|less\n\
:set pipe_decode=\$my_tmp_pipe_decode\n\
:unset my_tmp_pipe_decode\n"
macro index A \
    "<tag-pattern>~N<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" \
    "mark all new as read"
#macro pager U "<pipe-message>less<enter>" "CHECK"
# Quick jump to other mailboxes
bind index,pager            g       noop
bind generic                gg      first-entry
bind generic,index          G       last-entry
bind pager                  gg      top
bind pager                  G       bottom
bind index,pager            gv      sidebar-toggle-visible
bind generic                zt      current-top
bind generic                zz      current-middle
bind generic                zb      current-bottom
bind index                  za      collapse-thread
bind index                  zc      collapse-thread
bind index                  zA      collapse-all
#bind generic,pager          \Cy     previous-line
#bind generic,index,pager    \Ce     next-line


# Sidebar
set mail_check = 120
set mail_check_stats
set imap_check_subscribed
set sidebar_visible = yes
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
set sidebar_short_path = yes
set sidebar_new_mail_only = yes
set sidebar_width = 17
bind index,pager b sidebar-toggle-visible
bind index,pager B bounce-message
bind index \Cp sidebar-prev
bind index \Cn sidebar-next
bind index,pager \Co sidebar-open
bind index,pager <F5> sidebar-prev-new
bind index,pager <F6> sidebar-next-new
color indicator cyan black
color sidebar_highlight white color8
color sidebar_divider color8 black
color sidebar_flagged red black
color sidebar_new green black

# basic colors
color normal        white           black
color error         red             black
color tilde         white           black
color message       cyan            black
color markers       red             black
color attachment    brightred       black
color search        black           red
color status        brightwhite     black
color indicator     white           blue
color tree          magenta         black   # arrows in threads

# For list
# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2
color index         red             black         "~A"                        # all messages
color index         brightred       black         "~E"                        # expired messages
color index         brightcyan      black         "~N"                        # new messages
color index         brightcyan      black         "~O"                        # old messages
color index         brightmagenta   black         "~Q"                        # messages that have been replied to
color index         green           black         "~R"                        # read messages
color index         brightblue      black         "~U"                        # unread messages
color index         brightblue      black         "~U~$"                      # unread, unreferenced messages
color index         brightblue      black         "~v"                        # messages part of a collapsed thread
color index         yellow          black         "~P"                        # messages from me
color index         white           black         "~p!~F"                     # messages to me
color index         white           black         "~N~p!~F"                   # new messages to me
color index         brightblue      black         "~U~p!~F"                   # unread messages to me
color index         white           black         "~R~p!~F"                   # messages to me
color index         brightred       black         "~F"                        # flagged messages
color index         brightred       black         "~F~p"                      # flagged messages to me
color index         red             black         "~N~F"                      # new flagged messages
color index         red             black         "~N~F~p"                    # new flagged messages to me
color index         red             black         "~U~F~p"                    # new flagged messages to me
color index         brightyellow    black         "~T"                        # tagged messages
color index         black           brightmagenta "~D"                        # deleted messages
color index         black           green         "~v~(!~N!~O)"               # collapsed thread with no unread
color index         magenta         green         "~v~(~N|~O)"                # collapsed thread with some unread
color index         brightmagenta   green         "~N~v~(~N)"                 # collapsed thread with unread parent
color index         brightred       green         "~v~(~F)!~N"                # collapsed thread with flagged, no unread
color index         yellow          green         "~v~(~F~N)"                 # collapsed thread with some unread & flagged
color index         blue            green         "~N~v~(~F~N)"               # collapsed thread with unread parent & flagged
color index         blue            green         "~N~v~(~F)"                 # collapsed thread with unread parent, no unread inside, but some flagged
color index         yellow          red           "~v~(~D)"                   # thread with deleted (doesn't differentiate between all or partial)
color index         magenta         black         "~h Stay"                   # marked as Stay
color index         lightblack            black         "~h Done"                   # marked as Done

# color header
color header        green           black         "^(From)"
color header        magenta         black         "^(To)"
color header        yellow          black         "(-To)"
color header        brightyellow    black         "^(Subject)"

# Set quote's starting symbol
set quote_regexp = "^([ ]t]*[|>:}#])+"
set quote_regexp = "^([ \t ]*[>])+"

# Highlight quotes by indent
color quoted        blue            black
color quoted1       magenta         black
color quoted2       cyan            black
color quoted3       yellow          black
color quoted4       red             black

# urls
color body       brightblue    black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)"
color body       brightblue    black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)"

# *bold*, _underline_, and /italic/
color body       brightcyan    black "(^| )\\*[^ ]+\\*( |$)"
color body       brightcyan    black "(^| )_[^ ]+_( |$)"
color body       brightcyan    black "(^| )/[^ ]+/( |$)"