]> git.phdru.name Git - dotfiles.git/commitdiff
.muttrc: rewrite macros using commands instead of keys
authorOleg Broytman <phd@phdru.name>
Mon, 4 Apr 2016 22:23:01 +0000 (01:23 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 4 Apr 2016 22:23:01 +0000 (01:23 +0300)
Merge index/pager macros. Add <Esc>m macro to switch to sent-mail
folder.

.muttrc

diff --git a/.muttrc b/.muttrc
index 43b93f9475009f58c0a8d2b27cef8fd0e22fd894..14649aaa2f5c8a29a5911604d469e40e4ee6dac3 100644 (file)
--- a/.muttrc
+++ b/.muttrc
@@ -284,35 +284,40 @@ bind index,pager <Esc>S decode-save
 #
 
 # Go to the first folder with unread messages
-macro index C  <Home>c\n
-macro pager C q<Home>c\n
+macro index,pager C <Enter><exit><Home><change-folder><Enter>
 
 # Move current message to inbox
-macro index,pager S s!\n
+macro index,pager S <save-message>!<Enter>
 
-macro index,pager <Esc>h ":auto_view text/html\n"
-macro index,pager <Esc>H ":unauto_view text/html\n"
+macro index,pager <Esc>h ":auto_view text/html<Enter>"
+macro index,pager <Esc>H ":unauto_view text/html<Enter>"
 
 # 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 <Esc>s "<Enter>q"|"spamassassin -d | ~/mail/bin/spamcop.py\nj"
-macro index,pager <Esc>z "<Enter>q:set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn"
+macro index,pager <Esc>s <Enter><exit> \
+   "<pipe-message>spamassassin -d | ~/mail/bin/spamcop.py<Enter> \
+   <next-undeleted>"
+macro index,pager <Esc>z \
+   "<Enter><exit>:set editor='vim -s ~/mail/misc/spamcop.vim'<Enter> \
+   r:set editor=vim.sh<Enter><exit><next-undeleted>"
 
-# Go to main mailbox
-macro index H  <Home>c!\n
-macro pager H q<Home>c!\n
+# Go to main mailboxes
+macro index,pager H      <Enter><exit><Home><change-folder>!<Enter>
+macro index,pager <Esc>m <Enter><exit><Home><change-folder>=sent-mail<Enter>
 
 # Go to python mailbox
-macro index Y  <Home>c=lists/python\n
-macro pager Y q<Home>c=lists/python\n
+macro index,pager Y <Enter><exit><Home><change-folder>=lists/python<Enter>
+
+# Go to STCnet "Atlas"/STM mailboxes
+macro index,pager A      <Enter><exit><Home><change-folder>=stcnet<Enter>
+macro index,pager <Esc>a <Enter><exit><Home><change-folder>=sent-stcnet<Enter>
 
 # 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 "<pipe-message>mimedecode.py | less<Enter>"
+macro index,pager E \
+   ":set editor=mimedecode.sh<Enter><edit>:set editor=vim.sh<Enter>"
 
 # Convert X-Face header to an image and display it
-macro index,pager <Esc>f |"~/mail/bin/view-x-face\n"
+macro index,pager <Esc>f <pipe-message>~/mail/bin/view-x-face<Enter>
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #