98f54ca1eb58ff6ebe9375c4fd2136113052a203
[dotfiles.git] / email / .config / mutt / muttrc
1 # Basic information
2 set from="mart@martlubbers.net"
3 alternates "mart@(cs\.ru\.nl|mart@martlubbers\.net)"
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="/home/mrl/.config/mutt/checkattach.sh msmtp -a net"
17 set send_charset="us-ascii:utf-8"
18 macro index,pager $ "<shell-escape>/home/mrl/.config/mutt/force_sync.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="/home/mrl/.config/mutt/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))'\
25 'set sendmail="/home/mrl/.config/mutt/checkattach.sh msmtp -a ru"'
26
27 # Macro for switching to the ru address
28 macro compose <esc>2 "<esc>f^UMart Lubbers <mart@cs.ru.nl><enter>"
29 # Disable pgp when sending from a ru address
30 send2-hook '((~f m.lubbers@cs.ru.nl)|(~f m.lubbers@science.ru.nl)|(~f mart@cs.ru.nl)) (~g|~G)'\
31 'push <pgp-menu>c'
32
33 # Key bindings
34 bind index gg first-entry
35 bind index G last-entry
36 bind pager k previous-line
37 bind pager j next-line
38 bind pager gg top
39 bind pager G bottom
40 bind index,pager R group-reply
41 bind index,pager F flag-message
42
43 # Misc options
44 set timeout=2
45 set mail_check=0
46 set include=yes
47 set delete=yes
48 set confirmappend=no
49 set fast_reply=yes
50
51 # Display options
52 unset wait_key
53 unset markers
54 set sort_browser=alpha
55 set sort=threads
56 set sort_aux=date
57 set editor=vim
58 set duplicate_threads=yes
59 ignore headers *
60 unignore headers from to subject date cc
61 set mailcap_path=~/.config/mutt/mailcap
62 set mailcap_sanitize=yes
63
64 # w3m --dump
65 auto_view text/html
66 # pdftotext
67 auto_view application/pdf
68 # khal
69 auto_view application/ics
70 # libreoffice --cat
71 auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document
72 auto_view application/msword
73 auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document
74 auto_view application/vnd.oasis.opendocument.text
75
76 # Pager options
77 set pager_index_lines=20
78 set pager_context=3
79 set pager_stop
80 set menu_scroll
81 set tilde
82 set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
83
84 # Address book
85 set query_command= "khard email --parsable '%s'"
86 bind editor <Tab> complete-query
87 bind editor ^T complete
88 macro index,pager A \
89 "<pipe-message>khard add-email<return>" \
90 "add the sender email address to khard"
91
92 # sidebar
93 source ~/.config/mutt/sidebar.muttrc
94
95 # notmuch
96 source ~/.config/mutt/notmuch.muttrc
97
98 # Crypto
99 source ~/.config/mutt/gpg.muttrc
100
101 # Colors
102 source ~/.config/mutt/colors.muttrc