diff options
Diffstat (limited to '.mutt/muttrc.macros')
-rw-r--r-- | .mutt/muttrc.macros | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/.mutt/muttrc.macros b/.mutt/muttrc.macros new file mode 100644 index 0000000..2dc8eba --- /dev/null +++ b/.mutt/muttrc.macros @@ -0,0 +1,52 @@ +# Common macros +macro index \eR "|~/bin/mutt-remember-mail\n" +macro pager \cu <pipe-entry>'urlview'<enter> 'Follow links with urlview' + +macro index,pager \cb "<pipe-message> urlscan<Enter>" "call urlscan to extract URLs out of a message" +macro attach,compose \cb "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message" + +# Sidebar +macro index,pager B '<enter-command>toggle sidebar_visible<enter>' + +macro index <right> "<enter-command>toggle sidebar_visible<enter><display-message>" +macro pager <left> "<enter-command>toggle sidebar_visible<enter><exit>" + +macro index,pager D "<delete-message><sync-mailbox><enter>" "Delete message" + +macro index <F6> \ +"<enter-command>unset wait_key<enter><pipe-message>notmuch new<enter>" \ +"notmuch: Index new messages" + + +macro index <F7> \ + "<enter-command>unset wait_key<enter><shell-escape>~/bin/mutt-fetchbug --prompt search<enter><change-folder-readonly>~/.cache/mutt_btsresults<enter><enter-command>set wait_key<enter>" \ + "fetch bug(s) (using bts show)" + +macro index <F8> \ +"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<shell-escape>notmuch-mutt -r --prompt search<enter>\ +<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: search mail" + +macro index <F9> \ +"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<pipe-message>notmuch-mutt -r thread<enter>\ +<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: reconstruct thread" + +macro index <esc>m "T~N<enter>;WN^T~T<enter>T~O<enter>;WN^T~T<enter>" "mark all messages read" + + +# toggle TOFU protection with ESC-0 (off) and ESC-1 (on) +macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off" +macro generic \e1 ":set display_filter='t-prot -cmekatlS --max-lines=250 --bigq --pgp-short --pgp-move --pgp-move-vrf -Mmutt -L/etc/t-prot/footers -A/etc/t-prot/ads'\n" "Turn TOFU protection on" + +# same in pager mode - ugly but what the hell... +macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off" +macro pager \e1 ":set display_filter='t-prot -cmekatlS --max-lines=250 --bigq --pgp-short --pgp-move --pgp-move-vrf -Mmutt -L/etc/t-prot/footers -A/etc/t-prot/ads'; exec exit\n:exec display-message\n" "Turn TOFU protection on" + +macro attach 'V' "<pipe-entry>cat > ~/tmp/mail.html && xdg-open ~/tmp/mail.html && rm -f ~/tmp/mail.html<enter>" + +source "$HOME/.mutt/muttrc.macros.env|"
\ No newline at end of file |