1cf963771ac1b7a7b41e6f644e8f4b1bbd71f478
[dotfiles.git] / email / .config / mutt / muttrc
1 # Basic information
2 set from="Mart Lubbers <mart@martlubbers.net>"
3 alternates "(mart@cs\.ru\.nl|m\.lubbers@cs\.ru\.nl|mart@martlubbers\.net|Mart\.Lubbers@ru\.nl)"
4 set use_from=yes
5 set reverse_name=yes
6 set envelope_from=yes
7 set mbox_type=Maildir
8 set folder=~/.local/share/offlineimap/mail
9 set spoolfile=+/INBOX/
10 set record=+/Sent/
11 set postponed=+/Drafts/
12 set mask="!^\\.[^.]"
13 source ~/.local/share/offlineimap/mailboxes
14
15 # Receiving, sending and searching
16 set sendmail="checkattach.sh msmtp -a net"
17 set send_charset="us-ascii:utf-8"
18 macro index,pager $ "<shell-escape>sync_mail.sh<enter><sync-mailbox>" "Force refresh"
19 macro attach B "<pipe-entry>firefox \"data:text/html;base64,$(base64 -w 0 <&0)\"<enter>"
20
21 # Set the correct msmtp account for the different addresses
22 send2-hook '~f mart@martlubbers.net'\
23 'set sendmail="checkattach.sh msmtp -a net"'
24 send2-hook '((~f m.lubbers@cs.ru.nl)|(~f m.lubbers@science.ru.nl)|(~f mart@cs.ru.nl)|(~f m.lubbers@cs.ru.nl))'\
25 'set sendmail="checkattach.sh msmtp -a ru"'
26
27 # Macro for switching to the ru address
28 alias identity_1 Mart Lubbers <mart@martlubbers.net>
29 alias identity_2 Mart Lubbers <mart@cs.ru.nl>
30 macro compose v "<edit-from>^Uidentity\_<tab>" "Select from"
31 macro compose <esc>1 "<esc>f^UMart Lubbers <mart@martlubbers.net><enter>"
32 macro compose <esc>2 "<esc>f^UMart Lubbers <mart@cs.ru.nl><enter>"
33
34 # Key bindings
35 bind index gg first-entry
36 bind index G last-entry
37 bind pager k previous-line
38 bind pager j next-line
39 bind pager gg top
40 bind pager G bottom
41 bind index,pager R group-reply
42 bind index,pager F flag-message
43
44 # Misc options
45 set timeout=2
46 set mail_check=0
47 set include=yes
48 set delete=yes
49 set confirmappend=no
50 set fast_reply=yes
51
52 # Display options
53 unset wait_key
54 unset markers
55 set sort_browser=alpha
56 set sort=threads
57 set sort_aux=date
58 set editor=vim
59 set duplicate_threads=yes
60 ignore headers *
61 unignore headers from to subject date cc
62 set mailcap_path=~/.config/mutt/mailcap
63 set mailcap_sanitize=yes
64
65 # w3m --dump
66 auto_view text/html
67 # pdftotext
68 auto_view application/pdf
69 # khal
70 auto_view application/ics
71 auto_view text/calendar
72 # libreoffice --cat
73 auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document
74 auto_view application/vnd.oasis.opendocument.text
75 auto_view application/msword
76 # vcards
77 auto_view text/x-vcard
78
79 # Pager options
80 #set pager=/usr/share/vim/vim82/macros/less.sh
81 set pager_index_lines=5
82 set pager_context=3
83 set pager_stop
84 set menu_scroll
85 set tilde
86 set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
87
88 # Address book
89 set query_command= "khard email --parsable '%s'"
90 bind editor <Tab> complete-query
91 bind editor ^T complete
92 macro index,pager A \
93 "<pipe-message>khard add-email<return>" \
94 "add the sender email address to khard"
95
96 # sidebar
97 #source ~/.config/mutt/sidebar.muttrc
98
99 # notmuch
100 source ~/.config/mutt/notmuch.muttrc
101
102 # Crypto
103 source ~/.config/mutt/gpg.muttrc
104
105 # Colors
106 source ~/.config/mutt/colors.muttrc