d50b334c1b4dcce73cedc6a5eba4cddc53fdd496
[dotfiles.git] / .mutt / muttrc
1 # Basic information
2 set from="mart@martlubbers.net"
3 set use_from="yes
4 set envelope_from=yes
5 set mbox_type=Maildir
6 set folder=~/.mutt/mail
7 set spoolfile=+/INBOX/
8 set record=+/Sent/
9 set postponed=+/Drafts/
10 set mask="!^\\.[^.]"
11 source ~/.mutt/mailboxes
12
13 # Receiving, sending and searching
14 set sendmail="msmtp -C /home/mart/.mutt/msmtprc"
15 macro index,pager $ "<shell-escape>offlineimap -c ~/.mutt/offlineimaprc &<enter><sync-mailbox>" "Force refresh"
16 macro attach B "<pipe-entry>firefox \"data:text/html;base64,$(base64 -w 0 <&0)\"<enter>"
17 macro index <F8> \
18 "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
19 <shell-escape>notmuch-mutt -r --prompt search<enter>\
20 <change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
21 <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
22 "notmuch: search mail"
23
24 # Clean up mailing lists
25 macro index,pager \Ct "\
26 <tag-pattern>~C vim@vim.org | ~C vim_use<enter><tag-prefix-cond><save-message>=vim<enter><end-cond>\
27 <tag-pattern>~C lists.debian.org<enter><tag-prefix-cond><save-message>=debian<enter><end-cond>\
28 <tag-pattern>~C mutt-users@mutt.org<enter><tag-prefix-cond><save-message>=mutt<enter><end-cond>\
29 <tag-pattern>~C praat-users<enter><tag-prefix-cond><save-message>=praat<enter><end-cond>\
30 <tag-pattern>~C i3-discuss@i3.zekjur.net<enter><tag-prefix-cond><save-message>=i3<enter><end-cond>\
31 <sync-mailbox>" "Clean up mailing lists"
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 pager R group-reply
41
42 # Misc options
43 set timeout=2
44 set mail_check=0
45 set include=yes
46 set delete=yes
47 set confirmappend=yes
48 set fast_reply=yes
49
50 # Display options
51 unset wait_key
52 unset markers
53 set sort_browser=alpha
54 set sort=threads
55 set sort_aux=date
56 set editor=vim
57 set duplicate_threads=yes
58 ignore headers *
59 unignore headers from to subject date cc
60 set mailcap_path=~/.mutt/mailcap
61 set mailcap_sanitize=yes
62 auto_view text/html
63
64 # Pager options
65 set pager_index_lines=20
66 set pager_context=3
67 set pager_stop
68 set menu_scroll
69 set tilde
70 set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
71
72 # Aliases
73 set alias_file=~/.mutt/alias
74 source ~/.mutt/alias
75
76 # Colors
77 color normal white default
78 color attachment brightyellow default
79 color hdrdefault cyan default
80 color indicator default cyan
81 color markers brightred default
82 color quoted green default
83 color signature cyan default
84 color status brightgreen blue
85 color tilde blue default
86 color tree red default
87 color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
88 color body brightblue default (https?|ftp)://[\-\.\,/%~_:?\#a-zA-Z0-9]+
89 color quoted1 brightyellow default
90 color quoted2 red default
91 color hdrdefault cyan default
92 color signature cyan default
93 color index green default ~p
94 color index brightyellow default ~N
95 color index blue default ~T
96 color index red default ~D
97 color index brightblue default ~F
98
99 # Crypto
100 set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
101 set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
102 set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
103 set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
104 set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
105 set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
106 set pgp_import_command="gpg --no-verbose --import -v %f"
107 set pgp_export_command="gpg --no-verbose --export --armor %r"
108 set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
109 set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
110 set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
111 set pgp_sign_as=0xAD3FEBE7
112 set pgp_timeout=60
113 set pgp_good_sign="^gpg: Good signature from"
114 set crypt_autosign
115 set crypt_replysign
116 set crypt_replysignencrypted=yes
117 set crypt_verify_sig=yes
118 message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"