From 74481cf01ceef14b545d176bd0b7fc84ba12a7ce Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 5 Apr 2016 01:23:01 +0300 Subject: [PATCH] .muttrc: rewrite macros using commands instead of keys Merge index/pager macros. Add m macro to switch to sent-mail folder. --- .muttrc | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.muttrc b/.muttrc index 43b93f9..14649aa 100644 --- a/.muttrc +++ b/.muttrc @@ -284,35 +284,40 @@ bind index,pager S decode-save # # Go to the first folder with unread messages -macro index C c\n -macro pager C qc\n +macro index,pager C # Move current message to inbox -macro index,pager S s!\n +macro index,pager S ! -macro index,pager h ":auto_view text/html\n" -macro index,pager H ":unauto_view text/html\n" +macro index,pager h ":auto_view text/html" +macro index,pager H ":unauto_view text/html" # Pipe spam -#macro index,pager z |"sa-learn --no-sync --ham\n" -#macro index,pager Z |"sa-learn --no-sync --spam\n" -macro index,pager s "q"|"spamassassin -d | ~/mail/bin/spamcop.py\nj" -macro index,pager z "q:set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn" +macro index,pager s \ + "spamassassin -d | ~/mail/bin/spamcop.py \ + " +macro index,pager z \ + ":set editor='vim -s ~/mail/misc/spamcop.vim' \ + r:set editor=vim.sh" -# Go to main mailbox -macro index H c!\n -macro pager H qc!\n +# Go to main mailboxes +macro index,pager H ! +macro index,pager m =sent-mail # Go to python mailbox -macro index Y c=lists/python\n -macro pager Y qc=lists/python\n +macro index,pager Y =lists/python + +# Go to STCnet "Atlas"/STM mailboxes +macro index,pager A =stcnet +macro index,pager a =sent-stcnet # Recode base64 to 8bit, html to plain text, mustdie-1251 to koi8-r, etc. -macro index,pager M "|mimedecode.py | less\n" -macro index,pager E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n" +macro index,pager M "mimedecode.py | less" +macro index,pager E \ + ":set editor=mimedecode.sh:set editor=vim.sh" # Convert X-Face header to an image and display it -macro index,pager f |"~/mail/bin/view-x-face\n" +macro index,pager f ~/mail/bin/view-x-face # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # -- 2.39.5