dotfiles/.mutt/mailcap

54 lines
2.2 KiB
Plaintext
Raw Normal View History

2022-12-08 13:17:01 +01:00
# USAGE: <type> <command> <flags>
# Style: text/plain
2022-12-08 13:17:01 +01:00
# Command: cmd %s
# Flags:
# - copiousoutput use pager
# - needsterminal open in new terminal
# - text=xxx rule is valid if program xxx returns true
# - textualnewlines=0 turn off newline conversation for text
# - compose=xxx %s use program xxx to compose this type
# - edit=xxx use program xxx to edit this type
# - description=xxx set description
# - nametemplate=%s.html define temporary file name
# Format:
# - %s - Filename (if %s is not used, data will be sent to stdin)
# - %t - Mime Type
# - %{var1} - Specified by: var1=foobar;
#
# Env Variables:
# METAMAIL_PAGER=less
#
# Tests:
# test -n "$DISPLAY" true when X is running
# html
2023-04-10 13:00:38 +02:00
text/html; ~/.mutt/scripts/call-browser.sh %s; test=test -n "$DISPLAY"; needsterminal;
2022-12-08 13:17:01 +01:00
text/html; w3m -I %{charset} -T %t -cols "$COLUMNS" -s -no-graph -o display_link=1 -o display_link_number=1; copiousoutput;
# documents
application/pdf; ~/.mutt/scripts/call.sh mupdf %s; nametemplate=%s.pdf;
2023-04-10 13:00:38 +02:00
application/vnd.openxmlformats-officedocument.wordprocessingml.document; ~/.mutt/scripts/call.sh libreoffice %s;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; ~/.mutt/scripts/call.sh libreoffice %s;
application/vnd.openxmlformats-officedocument.presentationml.presentation; ~/.mutt/scripts/call.sh libreoffice %s;
application/vnd.oasis.opendocument.text; ~/.mutt/scripts/call.sh libreoffice %s;
application/vnd.oasis.opendocument.spreadsheet; ~/.mutt/scripts/call.sh libreoffice %s;
application/vnd.oasis.opendocument.presentation; ~/.mutt/scripts/call.sh libreoffice %s;
2022-12-08 13:17:01 +01:00
# media
2023-04-10 13:00:38 +02:00
image/*; ~/.mutt/scripts/call.sh nsxiv %s;
2022-12-08 13:17:01 +01:00
video/*; mpv %s; needsterminal;
audio/*; mpv %s; needsterminal;
application/ogg; mpv %s; needsterminal;
# calendar
text/calendar; clear && ~/.mutt/scripts/mutt-ical.py -i -e "stefan.hagen@sap.com" %s; nametemplate=%s.ics
application/ics; clear && ~/.mutt/scripts/mutt-ical.py -i -e "stefan.hagen@sap.com" %s; nametemplate=%s.ics
# winmail.dat fix
application/ms-tnef; tnef -w %s
# fallback
application/*; vim %s; needsterminal;
2023-04-10 13:00:38 +02:00
text/*; cat %s; copiousoutput;
message/rfc822; emldump -a %s; copiousoutput;