]> git.phdru.name Git - dotfiles.git/blobdiff - .muttrc
.muttrc: change some macros
[dotfiles.git] / .muttrc
diff --git a/.muttrc b/.muttrc
index bf67fd23c652f1a7d9220fc4a23289e36fd5538d..29cc6f04139e281f279b6bde5f777309f1f1d609 100644 (file)
--- a/.muttrc
+++ b/.muttrc
@@ -7,6 +7,14 @@
 #
 #set folder=~/Mail                # Where I keep my mailboxes; I am happy with this default
 
+# Character set for my terminal and config files (including aliases)
+set charset=`case "$LC_CTYPE" in *UTF-8) echo utf-8 ;; *) echo koi8-r ;; esac`
+set assumed_charset="us-ascii:utf-8:windows-1251:koi8-r" # Character sets for mail without a charset
+set config_charset=koi8-r # Character set for this config file and alias files
+set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # Character sets for outgoing mail
+charset-hook x-unknown koi8-r    # Show unknow encoding as koi8-r
+charset-hook windows-1251 cp1251 # Autoconvert windoze encoding
+
 # source aliases
 source =mutt/aliases
 
@@ -33,14 +41,6 @@ mailboxes ! =admin =block =bulk =spam `echo $HOME/mail/lists/* | sed s#$HOME/mai
 set ascii_chars=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Use ASCII instead of ACS chars for threads
 set arrow_cursor=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Draw a simple cursor on slow terminals
 
-# Character set for my terminal
-set charset=`case "$LC_CTYPE" in *UTF-8) echo utf-8 ;; *) echo koi8-r ;; esac`
-set assumed_charset="us-ascii:utf-8:windows-1251:koi8-r" # Character sets for mail without a charset
-set config_charset=koi8-r # Character set for this config file and alias files
-set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # Character sets for outgoing mail
-charset-hook x-unknown koi8-r    # Show unknow encoding as koi8-r
-charset-hook windows-1251 cp1251 # Autoconvert windoze encoding
-
 set index_format="%4C %Z %{%b %d} %-15.15F (%4c) %s" # Somewhat different index format, which works nicely with mail lists.
 set pager_format="%4C %Z %[%b %d] %-15.15F (%4l) %s %* ---(%P)---" # Mostly match index_format
 
@@ -60,7 +60,8 @@ set write_inc=10                 # Progress indicator when writing folders.
 
 set allow_8bit                   # Never do Q-P encoding on legal 8-bit chars
 set abort_unmodified=no          # Let me send empty messages
-set alias_file==mutt/aliases # Where to store aliases
+set alias_file==tmp/aliases      # Where to store aliases
+set attribution="`case "$LC_TIME" in ru_RU*) echo 'В %{%a, %d %b %Y в %I:%M:%S%p %Z} %f написал(а):' ;; *) echo 'On %d, %f wrote:' ;; esac`"
 set beep=no                      # Never beep on errors
 set collapse_unread=no           # Do not collapse thread with unread messages
 set confirmappend=no             # Don't ask me if i want to append to mailboxes
@@ -162,6 +163,7 @@ my_hdr X-Operating-System: Debian GNU/Linux
 #       lists <list-name> [ <list-name> ... ]
 
 subscribe (python-(announce|dev|ideas)|.*-(list|sig))@python\.org \
+   core-workflow@python\.org \
    .*@moderators\.isc\.org .*@lists\.sourceforge\.net \
    (durus|quixote)-users@mems-exchange\.org pysqlite@lists\.initd\.org \
    .*@googlegroups\.com mlug@unixcenter\.ru
@@ -181,7 +183,6 @@ folder-hook .* "\
    my_hdr From: Oleg Broytman <phd@phdru.name>; \
    my_hdr Reply-To: Oleg Broytman <phd@phdru.name>; \
    my_hdr X-Url: http://phdru.name/; \
-   set attribution='On %d, %f wrote:'; \
    set record==sent-mail; \
    set signature==signatures/phd@phdru.name"
 
@@ -239,26 +240,24 @@ send-hook .* "\
    my_hdr From: Oleg Broytman <phd@phdru.name>; \
    my_hdr Reply-To: Oleg Broytman <phd@phdru.name>; \
    my_hdr X-Url: http://phdru.name/; \
-   set attribution='On %d, %f wrote:'; \
    set signature==signatures/phd@phdru.name"
 
 send-hook "~L '@.*\.(r|s)u$'" "\
    my_hdr From: Олег Бройтман <phd@phdru.name>; \
    my_hdr Reply-To: Олег Бройтман <phd@phdru.name>; \
-   set attribution='В %{%a, %d %b %Y в %I:%M:%S%p %Z} %f написал:'; \
-   set signature==signatures/phd@phdru.name-ru"
+   set signature='iconv -f koi8-r ~/mail/signatures/phd@phdru.name-ru|'"
 
 send-hook "~L '@(mail|list|inbox|bk)\.ru'" "\
    my_hdr From: Олег Бройтман <phd@mail.ru>; \
    my_hdr Reply-To: Олег Бройтман <phd@mail.ru>; \
    my_hdr X-Url: http://my.mail.ru/mail/phd; \
-   set signature==signatures/phd@mail.ru"
+   set signature='iconv -f koi8-r ~/mail/signatures/phd@mail.ru|'"
 
 send-hook "~L '(@|\.)(((ya|yandex|narod)\.ru)|(yandex\.com)|yandex-team\.ru)$'" "\
    my_hdr From: Олег Бройтман <phd2@yandex.ru>; \
    my_hdr Reply-To: Олег Бройтман <phd2@yandex.ru>; \
    my_hdr X-Url: http://phd2.ya.ru/; \
-   set signature==signatures/phd2@yandex.ru"
+   set signature='iconv -f koi8-r ~/mail/signatures/phd2@yandex.ru|'"
 
 send-hook ~u unmy_hdr Reply-To
 
@@ -285,35 +284,38 @@ 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><reply>: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 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 <Esc>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>
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #