aboutsummaryrefslogtreecommitdiff
path: root/dot_muttrc
blob: d7e9dc0253f5ce2500126efafa13c9f56c79e2a7 (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
set realname = 'Ryan Kavanagh' # default: ''
set use_from = yes
set use_envelope_from = yes
set reverse_name = yes
set reverse_realname = no
alternates "ryanakca@(gmail\\.com|kubuntu\\.org|ubuntu\\.com)|(ryan\\.kavanagh|9rak)@queensu\\.ca|rak@(debian\\.org|rak\\.ac|ryanak\\.ca)|rkavanag@((andrew|alumni|cs)\\.cmu\\.edu)|rkavanagh@cs\\.cmu\\.edu|ryan@cs\\.queensu\\.ca|ryank@cs\\.mcgill\.ca|ryan\\.kavanagh@(mail\\.)?mcgill\\.ca"

set crypt_autosign = yes # default: no
set crypt_replysign = yes # default: no
set crypt_replysignencrypted = yes # default: no

set editor="vim"

set pager_context = 1

set send_charset="utf-8"

set imap_check_subscribed = yes # default: no
set imap_list_subscribed = yes # default: no

# Don't continue to next email when reaching end of current
set pager_stop = yes

# Display HTML mail only if there's no text/plain
alternative_order text/plain text/html *
auto_view text/html
set display_filter="~/bin/lbdb-fetchaddr-wrapper"

set timeout=15
set mail_check=60

set move = no

set header_cache="~/.mutt/cache/headers"
set message_cachedir="~/.mutt/cache/bodies"

set edit_headers = yes

# Sane subject format when forwarding:
set forward_format = "Fwd: %s"
# Mime forwarding
set mime_forward = ask-yes

#set arrow_cursor
#noop pager G
bind index G imap-fetch-mail
bind index ( next-unread-mailbox
bind index * next-unread
bind pager i exit

# To keep the macro .n from binding just .
bind index . noop
macro index .n "<tag-pattern>~N|~O<enter><tag-prefix-cond><tag-prefix><clear-flag>N<tag-prefix><clear-flag>O<untag-pattern>~T<enter>" "Catchup all new messages"

my_hdr OpenPGP: id=4E469519ED677734268FBD958F7BF8FC4A11C97A\; url=https://rak.ac/contact/4E469519ED677734268FBD958F7BF8FC4A11C97A.asc\; preference=sign

set sort=threads
set sort_aux=date
set move=no
set mark_old=no
ignore * # ignore all headers except for ...
unignore Date: From: To: CC: Bcc: Subject:
hdr_order Subject: Date: From: To: CC: Bcc:
# MessageNo Mo Day (To if sent by me, from if sent to me) List [Flags (Hidden Messages/line count) Subject
set index_format="%4C %{%m%d} %-16.16F [%Z] %?M?(#%03M)&(%4l)? %s"
# Narrow / wide versions.
macro index \cxn '<enter-command>set index_format="%4C %{%m%d} %-16.16F [%Z] %?M?(#%03M)&(%4l)? %s"<enter>'
macro index \cxw '<enter-command>set index_format="%4C %{%y%m%d} %-16.16F %-15.15B [%Z] %?M?(#%03M)&(%4l)? %s"<enter>'

set print_command="muttprint -2"

set mark_old=yes

set query_command="lbdbq %s"
# set query_command = "abook --mutt-query '%s'"
# macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"
# macro index,pager A "<pipe-message>abook --add-email-quiet<return>"
set reverse_alias = yes
set alias_file = ~/.mutt/alias.rc

set ispell="aspell -e -c"

# set up the sidebar, default not visible
set mail_check_stats=yes
set sidebar_visible = no
set sidebar_short_path = yes
set sidebar_folder_indent = yes
set sidebar_width = 25
set sidebar_format = "%B%?F? [%F]?%* %?N?%N?"
set sidebar_divider_char = "┃"
set sidebar_delim_chars = "/."
set sidebar_non_empty_mailbox_only = yes
set sidebar_sort_method = alpha
# which # mailboxes to list in the sidebar
# mailboxes =inbox =ml
# color of folders with new mail

# ctrl-n, ctrl-p to select next, prev folder #
# ctrl-o to open selected folder
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open

# Remap bounce-message function  to "B" 
bind index B bounce-message

macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'

macro index \cb |urlscan\n
macro pager \cb |urlscan\n
macro index I 'c=INBOX<enter>'
macro index x 'c=QueensU.INBOX<enter>'
#:source ~/.muttrc<enter>'

bind editor <space> noop

unignore X-Label:

set mbox_type=mbox

# In case it's unset
set sendmail="sendmail -oem -oi"

# For the -f option to work properly with account-hooks, it looks like I need
# to unset the folder option
unset folder
source ~/.mutt/accounts.rc
# load alias-cmu.rc before alias.rc so that alias.rc overrides any aliases
# in all accounts apart from SCS. The SCS account hook reloads alias-cmu.rc
# afterwards
source ~/.mutt/alias-cmu.rc
source ~/.mutt/alias.rc
source ~/.mutt/mailinglists.rc
source ~/.mutt/score.rc
source ~/.mutt/color.rc
source ~/.mutt/savehooks.rc
source ~/.mutt/gpg.rc
source ~/.mutt/news.rc

#set folder="/home/ryan/.maildb/GMAIL/"
#set spoolfile='/home/ryan/.maildb/GMAIL/INBOX'
#mailboxes ! + `sed -e 's/\(.*\)$/"+.\1"/g' .maildb/GMAIL/subscriptions | tr '\n' ' '`
#mailboxes ! + `\
#for file in ~/.maildb/GMAIL/.*; do \
#box=$(basename "$file"); \
#if [ ! "$box" = '.' -a ! "$box" = '..' -a ! "$box" = '.customflags' \
#   -a ! "$box" = '.subscriptions' ]; then \
# echo -n "\"+$box\" "; \
#fi; \
#done`

set tmpdir='~/.mutt/tmp'

macro index <F7> \
  "<enter-command>unset wait_key<enter><shell-escape>~/bin/mutt-fetchbug --prompt search<enter><change-folder-readonly>~/.cache/mutt_btsresults<enter><enter-command>set wait_key<enter>" \
  "fetch bug(s) (using bts show)"
macro index <F8> \
  "<enter-command>unset wait_key<enter><shell-escape>~/bin/mutt-notmuch --prompt search<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
  "search mail (using notmuch)"
macro index <F9> \
  "<enter-command>unset wait_key<enter><pipe-message>~/bin/mutt-notmuch thread<enter><change-folder-readonly>~/.cache/mutt_results<enter><enter-command>set wait_key<enter>" \
  "search and reconstruct owning thread (using notmuch)"

macro index <Esc>N \
  "<limit>~(~N|~O)<enter>" \
  "Show only threads with new/old messages"

macro index <Esc>A \
  "<limit>all<enter>" \
  "Show all messages (remove limit)"