dotfiles/private_dot_mutt/macros.rc
2021-06-01 13:54:14 -04:00

32 lines
2.4 KiB
Text

#index
macro index <F8> \
"<enter-command>unset wait_key<enter><shell-escape>~/bin/mutt-notmuch --prompt search -o ~/Maildir/mutt_results<enter><change-folder-readonly>~/Maildir/mutt_results<enter>" \
"search mail (using notmuch)"
macro index <F9> \
"<enter-command>unset wait_key<enter><pipe-message>~/bin/mutt-notmuch thread<enter><change-folder-readonly>~/.cache/Maildir/<enter><enter-command>set wait_key<enter>" \
"search and reconstruct owning thread (using notmuch)"
# macro index,browser t "<pipe-message>mutt2task<enter>"
macro index,browser,pager t "<pipe-message>/home/kellya/projects/arachnitech/mutt2tw/mutt2tw.py<enter>"\
"A"
# 'L' performs a notmuch query, showing only the results
macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
# 'a' shows all messages again (supersedes default <alias> binding)
### Nutmuch stuff
macro index a "<limit>all\n" "show all messages (undo limit)"
macro index \\\\ "<vfolder-from-query>" # looks up a hand made query
macro index I "<modify-labels>-inbox -unread\\n" # removed from inbox
macro index S "<modify-labels-then-hide>-inbox -unread +junk\\n" # tag as Junk mail
macro index + "<modify-labels>+*\\n<sync-mailbox>" # tag as starred
macro index - "<modify-labels>-*\\n<sync-mailbox>" # tag as unstarred
#### end notmuch stuff
#Attachments
macro attach A "<pipe-message>/home/kellya/projects/public/mutt-filters/vcalendar-filter | /home/kellya/projects/public/khal/misc/mutt2khal<enter>"
# Archive
# macro index A ":set confirmappend=no delete=yes\n<save-message>=archive\n<sync-mailbox>:set confirmappend=no delete=yes\n<modify-labels>+archive -unread -inbox\\n"
bind index,browser,pager . noop
macro index .cp '<enter-command>source ~/.mutt/accounts/arachnitech<enter><change-folder>~/Maildir/arachnitech/INBOX/<enter>'
macro index .cc '<enter-command>source ~/.mutt/accounts/franklin<enter><change-folder>~/Maildir/franklin/INBOX/<enter>'
#macro pager .ob <pipe-entry>'urlview'<enter> 'Follow links with urlview'
macro index,pager .ob "<pipe-message> urlscan<Enter>" "call urlscan to extract URLs out of a message"