dotfiles/office/.config/neomutt/mailcap
Marty Oehme 044eedea32
neomutt: Add ics to calendar by printing it
By invoking 'print' for ics files from neomutt we can simply
add it to our local calendar directly from the interface.
Neat little 'cheat' to provide custom functions for specific
file types.
2024-02-10 13:41:30 +01:00

29 lines
1.2 KiB
Plaintext

# open html emails in browser (or whatever GUI program is used to render HTML)
text/html; open %s ; nametemplate=%s.html
# render html emails inline using magic (uncomment the line below to use lynx instead)
# text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
text/html; render-prettyhtml %s; nametemplate=%s.html; copiousoutput;
text/plain; $EDITOR %s ;
# show calendar invites
text/calendar; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal
application/ics; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal
# open images externally
image/*; imv %s ;
# open videos in mpv
video/*; mpv --autofit-larger=90\%x90\% %s; needsterminal;
video/*; setsid mpv --quiet %s &; copiousoutput
# open spreadsheets in sc-im
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; sc-im %s; needsterminal
# open anything else externally
application/pdf; open %s;
application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; open /tmp/mutt/$(basename %s) &
application/pgp-encrypted; gpg -d '%s'; copiousoutput;
application/pgp-keys; gpg --import '%s'; copiousoutput;