-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
neomuttrc
155 lines (149 loc) · 5.24 KB
/
neomuttrc
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
# Setting {{{1 #
set sleep_time = 0
set real_name = $DEBFULLNAME
set attach_save_dir = ~/Downloads
set digest_collapse = no
set use_envelope_from
set move
set include
set menu_scroll
set ispell = aspell
set charset = utf-8
set edit_headers
set rfc2047_parameters
set signature = "echo Best Regards'\n'$DEBFULLNAME|"
set sort = reverse-date
set query_command = 'mutt_ldap_query.pl %s'
set abort_unmodified = no
set abort_nosubject = no
set auto_tag
set x_comment_to
set header_cache = ~/.cache/neomutt
set message_cache_dir = ~/.cache/neomutt
set mail_check_stats
set sidebar_visible
set sidebar_format = '%B%* %n%o/%S'
set sidebar_short_path
set sidebar_folder_indent
set sidebar_indent_string = '├── '
set ssl_starttls = yes
set ssl_force_tls = yes
set mbox = ''
auto_view text/html application/msword application/pdf application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.ms-excel
source ~/.config/neomutt/mutt-colors-custom/neomuttrc.custom
# 1}}} Setting #
# Hotkey {{{1 #
bind pager,index,attach,browser g noop
bind pager,index,attach,browser z noop
bind pager,index,attach,browser [ noop
bind pager,index,attach,browser ] noop
bind pager gg top
bind pager G bottom
bind index,attach,browser gg first-entry
bind index,attach,browser G last-entry
bind pager k previous-line
bind pager j next-line
bind pager <Up> previous-line
bind pager <Down> next-line
bind index,attach,browser k previous-entry
bind index,attach,browser j next-entry
bind pager,index K previous-entry
bind pager,index J next-entry
bind pager,index gK previous-undeleted
bind pager,index gJ next-undeleted
bind pager,index [[ previous-unread
bind pager,index ]] next-unread
bind pager,index [] previous-new
bind pager,index ][ next-new
bind pager,index,compose gE edit-type
bind pager,index,compose gd edit-description
bind pager,index,compose gu toggle-unlink
bind pager,index,attach,browser,compose \ce next-line
bind pager,index,attach,browser,compose \cy previous-line
bind pager,index,attach,browser,compose u half-up
bind pager,index,attach,browser,compose d half-down
bind pager,index,attach,browser D next-page
bind pager,index,attach,browser U previous-page
bind pager,index,attach,browser g? help
bind pager,index,attach,browser ? search-opposite
bind pager,index \ck sidebar-prev
bind pager,index \cj sidebar-next
bind pager,index gk sidebar-prev-new
bind pager,index gj sidebar-next-new
bind pager,index \cu sidebar-page-up
bind pager,index \cd sidebar-page-down
bind pager,index \cw sidebar-open
bind pager,index \ch sidebar-toggle-visible
bind pager,index <BackSpace> sidebar-toggle-visible
bind pager,index gK what-key
bind index gx extract-keys
bind index za collapse-thread
bind index zA collapse-all
bind index \cr sync-mailbox
bind index gJ next-unread-mailbox
bind index \co previous-new-then-unread
bind index gr group-reply
bind index gR list-reply
unbind index,attach L
bind index I show-log-messages
unbind index,attach M
bind index C edit-label
bind index y copy-message
bind index o display-message
bind browser + sort
bind browser - sort-reverse
bind index = check-stats
bind index gf fetch-mail
bind index gu undelete-message
bind index gU undelete-pattern
bind index g\cu undelete-thread
bind index x delete-message
bind index X delete-pattern
bind index \cx delete-thread
bind index <Esc>x delete-subthread
bind index gm mark-message
bind index g/ root-message
bind index ~ toggle-read
bind pager,index gs compose-to-sender
# 1}}} Hotkey #
# Handlers {{{1 #
# https://neomutt.org/feature/compress#4-%C2%A0neomuttrc
# handler for compressed/encrypted mailboxes
open-hook '\.gz$' "gzip --stdout --decompress '%f' > '%t'"
close-hook '\.gz$' "gzip --stdout '%t' > '%f'"
append-hook '\.gz$' "gzip --stdout '%t' >> '%f'"
open-hook '\.bz2$' "bzip2 --stdout --decompress '%f' > '%t'"
close-hook '\.bz2$' "bzip2 --stdout '%t' > '%f'"
append-hook '\.bz2$' "bzip2 --stdout '%t' >> '%f'"
open-hook '\.xz$' "xz --stdout --decompress '%f' > '%t'"
close-hook '\.xz$' "xz --stdout '%t' > '%f'"
append-hook '\.xz$' "xz --stdout '%t' >> '%f'"
# pgp/gpg does not support appending to an encrypted file
open-hook '\.pgp$' "pgp -f < '%f' > '%t'"
close-hook '\.pgp$' "pgp -fe YourPgpUserIdOrKeyId < '%t' > '%f'"
open-hook '\.gpg$' "gpg --decrypt < '%f' > '%t'"
close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' > '%f'"
# 1}}} Handlers #
# Config {{{1 #
set my_config = ~/.config/neomutt/neomuttrc
set my_ustc = qiye.163.com
set my_njust = exmail.qq.com
set my_qq = qq.com
set my_gmail = gmail.com
set my_imap_ustc = imaps://imaphz.$my_ustc
set my_imap_njust = imaps://imap.$my_njust
set my_imap_qq = imaps://imap.$my_qq
set my_imap_gmail = imaps://imap.$my_gmail
source $my_config.ustc
folder-hook $my_imap_ustc source $my_config.ustc
folder-hook $my_imap_njust source $my_config.njust
folder-hook $my_imap_qq source $my_config.qq
folder-hook $my_imap_gmail source $my_config.gmail
set my_pre = <sync-mailbox><enter-command>source
set my_post = <enter><change-folder>!<enter>
macro index g1 "$my_pre $my_config.ustc$my_post"
macro index g2 "$my_pre $my_config.qq$my_post"
macro index g3 "$my_pre $my_config.gmail$my_post"
macro index g4 "$my_pre $my_config.njust$my_post"
# 1}}} Config #
# ex: foldmethod=marker