From ffb440066d953391036b6d842e9612680d21bc9b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 6 Feb 2015 12:00:30 +0800 Subject: Added 'X-Label' tools & settings to mutt. * mutt-xlabel.py: manipulate labels. --- .mutt/muttrc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to '.mutt/muttrc') diff --git a/.mutt/muttrc b/.mutt/muttrc index 6c640b7..cf30a88 100644 --- a/.mutt/muttrc +++ b/.mutt/muttrc @@ -88,9 +88,9 @@ unset mime_forward # forward attachments as part of body ### Headers ignore * -unignore from: to: cc: bcc: date: subject: +unignore from: to: cc: bcc: date: subject: X-Label: unhdr_order * -hdr_order from: to: cc: date: subject: +hdr_order from: to: cc: date: subject: X-Label: ### Encoding set send_charset = "us-ascii:utf-8" @@ -101,7 +101,7 @@ set rfc2047_parameters # to fix attachment filename encoding ### Index view # first bang ("!") to expand month week names in the C locale set date_format = "!%a %m/%d %I:%M" -set index_format = "[%Z] %d %3M %-15.15L (%4c) %s" +set index_format = "[%Z] %d %2M %-15.15L %4c%?X?[%X]& ? %s" set folder_format = "%2C %t %N %8s %f" set sort = threads set sort_aux = reverse-last-date-received @@ -166,7 +166,7 @@ macro index B "~b " \ macro index I "!" \ "go to Inbox" # Save a decoded copy in ~/ -macro index > "cat > ~/" \ +macro index,pager > "cat > ~/" \ "save message as" # Open in vim macro index,pager V "vim -c 'setlocal ft=mail buftype=nofile' -" \ @@ -188,6 +188,11 @@ macro pager ';' "" \ # notmuch macro index s "unset wait_key~/.mutt/mutt-notmuch.py -G $folder/search+search" \ "search mail (using notmuch)" +# labels +macro index,pager x 'set my_oldeditor=$editorset editor="~/.mutt/mutt-xlabel.py"Nset editor=$my_oldeditor' \ + "edit X-Label" +macro index \Cx "~y " \ + "limit view to label" ### aliases set sort_alias = alias # sort alias file by alias @@ -216,7 +221,7 @@ macro index,pager P "tmux new-window -a -t mutt 'mutt -F ~ "recall postponed message in new tmux window" # Set the editor for for editing messages in-place, # allows re-editing before sending, e.g. for use in forwarding messages. -macro compose E 'set my_oldeditor=$editorset editor="vim"set editor=$my_oldeditor' \ +macro compose E 'set my_oldeditor=$editorset editor="vim"set editor=$my_oldeditor' \ "edit message in-place" # open mailbox listing in a new window macro index,pager Y 'tmux new-window -a -t mutt "mutt -y"' \ @@ -232,8 +237,8 @@ source ~/.mutt/colors source ~/.mutt/gpg.rc ## auto view -auto_view text/html application/x-gunzip application/x-bzip \ - application/x-tar-gz application/x-compressed-tar +auto_view text/html application/x-tar-gz application/x-compressed-tar \ + application/x-bzip-compressed-tar ## MIME types that should *not* be treated according to their mailcap entry mime_lookup application/octet-stream application/X-Lotus-Manuscript -- cgit v1.2.2