commit fe2dbd22dfcc4bebcf23d491f1efd150258845a7
parent ae8efaf4bdb954a06c84b582dc613d062096890c
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Mon, 11 Mar 2013 00:21:03 +0100
clean up muttrc
Diffstat:
mutt/muttrc | | | 217 | +++++++++++++++++++++++++++++++++++++++++-------------------------------------- |
1 file changed, 113 insertions(+), 104 deletions(-)
diff --git a/mutt/muttrc b/mutt/muttrc
@@ -1,96 +1,93 @@
-source "~/.mutt/local"
-# private stuff
-source "~/.mutt/perso"
-
-# edition stuff
-set edit_headers=yes
-set fast_reply
-# use M for postponed messages, look at statusbar to count them
-set recall="no"
-# useful to abort a message quickly if i change my mind
-set abort_unmodified=yes
-set abort_nosubject=yes
+# == Locations ==
-# save draft mail in a secure location in case of crash
+set folder=~/Mail_inbox
+set spoolfile="~/Mail_inbox/INBOX"
+set postponed="=INBOX"
+set record=~/Mail_alot/sent
+# don't save draft mail in a place that might get cleaned up unexpectedly
set tmpdir="~/temp/mutt/"
+# speeds things up sometimes
+set header_cache=~/.cache/mutt_header_cache
+# aliases
+set alias_file=~/config/mutt/aliases
+source ~/config/mutt/aliases
+set reverse_alias
+set query_command="lbdbq '%s'"
-set move=no
-set copy=yes
-set noconfirmappend
-#set mark_old=no
-
+# == Editor ==
set editor="vim -c 'set tw=72' +/^$ ++1"
-set imap_keepalive=60
-set imap_idle=yes
-
-# speeds things up sometimes
-set header_cache=~/.cache/mutt_header_cache
+# == Personal stuff ==
+source "~/.mutt/perso"
-# use the right encoding
+# == Encoding ==
set charset=utf-8
set send_charset=utf-8
-# forward things with mime, i don't care about crappy clients
-set mime_forward=yes
-set mime_forward_rest=yes
+# == Interface ==
+set nohelp
+set fast_reply
+set norecall
+set abort_nosubject
+set tilde
+set sleep_time=0
+set nomarkers
+set nowait_key
# check mail frequently
set timeout=10
set mail_check=5
-
-# i know my bindings now
-set help=no
-
set pager_index_lines=5
-set include=yes
-#set signature=~/.signature
-#set sig_dashes=no
-
-# pgp stuff
-set pgp_autosign=yes
-set pgp_replyencrypt=yes
-set pgp_sign_as=0xFD33167A
-message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"
-
-# aliases
-set alias_file=~/config/mutt/aliases
-source ~/config/mutt/aliases
-set reverse_alias
-
# sorting and threading
set sort=threads
set sort_aux="last-date"
set strict_threads
-set tilde
+# formats
+set index_format="%{%d/%m %H:%M}%Z %-15.15L %?M?<#%03M>&?%s"
+set pager_format="%4c -%Z- %C/%m: %-20.20n %s"
+set status_format="%r%f %?l?%l? %?M?%M/?%m:%?n? N%n?%?o? O%o?%?d? D%d?%?F? !%F?%?t? *%t?%> %h (%s/%S%?V?-%V?) (%P)"
-# color url and email addresses
-color body magenta default "(ftp|http)://[-a-z0-9_.+!*',;/?:@&=%~#]+"
-color body red default [-a-z0-9_.]+@[-a-z0-9_.]+
-mono body underline "(ftp|http)://[-a-z0-9_.+!*',;/?:@&=%~#]+"
-mono body underline [-a-z0-9_.]+@[-a-z0-9_.]+
+# useful with notmuch
+unignore Message-Id
-# don't pause to display messages
-set sleep_time=0
+# == Mail composition ==
+set edit_headers
+set include
+
+# forward things with mime, i don't care about crappy clients
+set mime_forward
+set mime_forward_rest
+
+# == Mailbox handling ==
+set nomove
+set noconfirmappend
+set nomark_old
+set delete
+# == GPG ==
+set pgp_autosign
+set pgp_replyencrypt
+set pgp_use_gpg_agent
+message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"
+
+# == Colors ==
+#
# inbox colors
-#color index magenta black ~g
-color index red black ~G
-color index brightwhite black ~p
-color index blue black ~l
-color index yellow black ~P
-color index black blue ~E
-color index black blue ~S
-color index green black ~Q
-color index brightblack yellow ~F
-color index brightwhite cyan ~N
-color index default cyan ~O
-color index black red ~D
-color index white green ~T
-
-# other colors
+color index red black ~G # encrypted
+color index cyan black ~p # adressed to me personally
+color index yellow black ~P # message from me
+color index black blue ~E # expired, no one uses that
+color index black blue ~S # superseded, no one uses that
+color index green black ~Q # have been replied to
+color index black yellow ~F # flagged
+color index white cyan ~N # new
+color index white cyan ~O # old
+color index black red ~D # deleted
+color index white green ~T # tagged
+
+# other colors, from https://gist.github.com/jstorimer/281158
color attachment brightmagenta black
color error brightwhite red # errors yell at you in red
color hdrdefault red black # headers
@@ -110,7 +107,13 @@ color tilde green default
mono tilde bold
color header cyan black ^(From|Subject): # Important headers
-# Coloring quoted text - coloring the first 7 levels:
+# color url and email addresses
+color body magenta default "(ftp|http)://[-a-z0-9_.+!*',;/?:@&=%~#]+"
+color body red default [-a-z0-9_.]+@[-a-z0-9_.]+
+mono body underline "(ftp|http)://[-a-z0-9_.+!*',;/?:@&=%~#]+"
+mono body underline [-a-z0-9_.]+@[-a-z0-9_.]+
+
+# coloring quoted text - coloring the first 7 levels:
color quoted cyan black
color quoted1 yellow black
color quoted2 red black
@@ -120,40 +123,31 @@ color quoted5 yellow black
color quoted6 red black
color quoted7 green black
-# Colorize smileys: :-) ;-) :-/ :-(
+# colorize smileys: :-) ;-) :-/ :-(
color body yellow black "[;:]-[)/(|]"
color body yellow black "[;:][)/(|]"
color body green black "[[:alpha:]]\+://[^ ]*"
-set markers=no
-
-set ssl_starttls=yes
-
-# set index_format="%4C %Z %{%m-%d %H:%M} %-12.12L %4c %s %?M?<#%03M>&?"
-set index_format="%{%d/%m %H:%M}%Z %-15.15L %?M?<#%03M>&?%s"
-set pager_format="%4c -%Z- %C/%m: %-20.20n %s"
-set status_format="%r%f %?l?%l? %?M?%M/?%m:%?n? N%n?%?o? O%o?%?d? D%d?%?F? !%F?%?t? *%t?%> @%h (%s/%S%?V?-%V?) %?p?*P%p*? (%P)"
+# == Bindings ==
# more vim-like bindings
macro index G <last-entry>
+bind index < first-entry
+bind index > last-entry
+# remap <help> to elsewhere than ? and <F1>
+macro index,pager <F2> <help>
macro index,pager \cf <next-page>
macro index,pager \cb <previous-page>
macro index,pager ? <search-reverse>
-# we must move help from '?' to somewhere else, and <F1> is already
-# taken by the manual
-macro index <F2> <help>
-macro pager <F2> <help>
-
-set wait_key=yes
+macro index,pager <Esc>/ "<search>~b "
+macro index,pager <Esc>? "<search-reverse>~b "
-#set menu_scroll=yes
-
-# remove useless bindings and dangerous bindings (no, I don't want to
-# edit mail)
+# remove unneccessary bindings
bind index,pager & noop
bind index,pager . noop
-bind index,pager e noop
+bind index,pager x noop
bind index,pager p noop
+bind index,pager <Esc>b noop
bind index,pager <Down> noop
bind index,pager <Up> noop
bind index,pager <Left> noop
@@ -162,20 +156,35 @@ bind index,pager <Esc>s noop
bind index \# noop
bind index <End> noop
bind index <Home> noop
-bind index < first-entry
-bind index > last-entry
-bind index \# noop
-
-# private stuff
-source ~/config/mutt/moderation
-
-# auto_view text/html
-
-set query_command="lbdbq '%s'"
-
-unignore Message-Id
-set record=/home/a3nm/Mail_alot/sent
+# == Bindings ==
+
+macro index,pager p "s=hand_spam<enter>" "mark as spam"
+macro index,pager x "s!" "save to inbox"
+macro index,pager E "C=useful<enter>" "copy to useful"
+macro index,pager I c!<enter> "inbox"
+bind index,pager , next-unread-mailbox
+
+macro index \\ \
+"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
+<shell-escape>notmuch-mutt -r --prompt search<enter>\
+<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>G\
+<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
+ "notmuch: search mail"
+
+macro index z \
+"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
+<pipe-message>notmuch-mutt -r thread<enter>\
+<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
+<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
+ "notmuch: reconstruct thread"
+
+# recall selected mail
+macro index,pager R \
+"<enter-command>set my_old_resolve=\$pipe_decode noresolve<enter>\
+d<resend-message>\
+<enter-command>set resolve=\$my_old_resolve <enter>" \
+ "recall"
+set noabort_unmodified # because of this use of 'R'
-set pgp_use_gpg_agent = yes