commit caea76066382069a2c5007f2b72fedf18d0f1a78 parent f64e8fa9117bba7c6d13800e361e634144573d2b Author: Anders Damsgaard <andersd@riseup.net> Date: Thu, 8 Mar 2018 11:22:49 -0500 Improve mutt bindings for offlineimap Diffstat:
M | links/.mutt/muttrc | | | 32 | +++++++++++++++++++++++--------- |
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/links/.mutt/muttrc b/links/.mutt/muttrc @@ -4,7 +4,7 @@ source ~/.mutt/mailboxes # mailboxes generated by offlineimap set spoolfile = "+riseup/INBOX" set mbox_type=Maildir -# Send mail settings +# Account-specific settings folder-hook riseup 'set \ from="Anders Damsgaard <andersd@riseup.net> "\ realname="Anders Damsgaard"\ @@ -189,19 +189,33 @@ macro index Y "<next-unread-mailbox>" "go to next mailbox with unread mails" #macro index o "<shell-escape>offlineimap -u blinkenlights -qf INBOX<enter>" #"run offlineimap to sync inboxes" +#macro index,pager S "<enter-command>unset wait_key<enter>\ +#<pipe-entry>bogofilter -l -s<enter>\ +#<enter-command>set wait_key<enter>\ +#<bounce-message>me@rescam.org<enter>\ +#<save-message>=riseup/Spam<enter>" "mark as spam" macro index,pager S "<enter-command>unset wait_key<enter>\ <pipe-entry>bogofilter -l -s<enter>\ <enter-command>set wait_key<enter>\ -<bounce-message>me@rescam.org<enter>\ <save-message>=riseup/Spam<enter>" "mark as spam" -macro index O "<enter-command>unset wait_key<enter>\ -<shell-escape>offlineimap<enter>\ -<enter-command>set wait_key<enter>" "run offlineimap to sync all mail" - -macro index o "<enter-command>unset wait_key<enter>\ -<shell-escape>offlineimap -qf INBOX<enter>\ -<enter-command>set wait_key<enter>" "run offlineimap to sync inboxes" +# sync all accounts +macro index <Esc>o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>" +macro index <Esc>O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>" + +# sync current inbox +folder-hook riseup 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a riseup -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook princeton 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a princeton -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook noaa 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a noaa -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook gmail 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a gmail -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook geomail 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a geomail -qf INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' + +# sync current account +folder-hook riseup 'macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a riseup\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook princeton 'macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a princeton\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook noaa 'macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a noaa\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook gmail 'macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a gmail\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook geomail 'macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -p 25 \"offlineimap -a geomail\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' macro index K "<enter-command>unset wait_key<enter>\ <shell-escape>kill -9 $(ps aux|grep offlineimap|grep python|awk ' {print $2} ')<enter>" "kill all offlineimap processes"