mailcap 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ##### My (demuredemeanor) muttrc mailcap file
  2. # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
  3. # https://notabug.org/demure/dotfiles
  4. # legacy repo http://github.com/demure/dotfiles
  5. # vim:set syntax=mailcap:
  6. ## Note:
  7. # due to how vim is handling mailcap, I will be nesting levels with extra #s
  8. ### Docs ### {{{
  9. ## MS Word Documents
  10. application/msword; ~/.mutt/view_attachment.sh %s "-" & sleep 5; test=test -n "$DISPLAY"
  11. application/msword; antiword %s
  12. application/vnd.openxmlformats-officedocument.wordprocessingml.document; ~/.mutt/view_attachment.sh %s "-" & sleep 5; test=test -n "$DISPLAY"
  13. ### End Docs ### }}}
  14. ### Images ### {{{
  15. image/*; feh %s & sleep 5; test=test -n "$DISPLAY"
  16. image/*; cacaview %s
  17. ### End Images ### }}}
  18. ### PDFs ### {{{
  19. application/pdf; ~/.mutt/view_attachment.sh %s pdf; test=test -n "$DISPLAY"
  20. ## Check this once you have a good pdf email
  21. application/pdf; pdftohtml -q %s - | w3m -T text/html; copiousoutput
  22. application/postscript; zathura %s; test=test -n "$DISPLAY"
  23. application/postscript; ps2ascii %s; copiousoutput;
  24. ### End PDFs ### }}}
  25. ### Video ### {{{
  26. video/*; mpv %s > /dev/null;
  27. ### End Video ### }}}
  28. ### Audio ### {{{
  29. audio/*; mpv %s >/dev/null;
  30. ### End Audio ### }}}
  31. ### Text/HTML ### {{{
  32. text/plain; less %s; edit=vim; compose=vim; needsterminal
  33. text/html; ~/.mutt/view_attachment.sh %s html; test=test -n "$DISPLAY"
  34. ## Disabled for security
  35. #text/html; w3m %s; nametemplate=%s.html; needsterminal
  36. #text/html; w3m -v -F -T text/html -dump %s; copiousoutput
  37. #text/html; elinks -dump -dump-color-mode 3 %s; copiousoutput
  38. text/rtf; ~/.mutt/view_attachment.sh %s rtf
  39. text/xml;
  40. text/*; less %s; edit=vim; compose=vim; needsterminal
  41. ### End Text ### }}}
  42. ### Compressed Files ### {{{
  43. application/x-zip; unzip -l %s; copiousoutput
  44. application/zip; unzip -l %s; copiousoutput
  45. application/x-rar; unrar l %s; copiousoutput
  46. application/x-rar-compressed; unrar l %s; copiousoutput
  47. application/x-tar; tar -tvf %s; copiousoutput
  48. application/x-tarz; tar -tvf %s; copiousoutput
  49. application/x-gzip; tar -ztvf %s; copiousoutput
  50. application/x-bzip2; tar -jtvf %s; copiousoutput
  51. application/x-bzip; tar -jtvf %s; copiousoutput
  52. application/x-bzip-compressed-tar; tar -jtvf %s; copiousoutput
  53. application/x-7z-compressed; 7z l %s; copiousoutput
  54. application/x-7z-compressed-tar; 7z l %s; copiousoutput
  55. ### End Compressed ### }}}
  56. ### vcard ### {{{
  57. #text/x-vcard; evolution %s; test=test -n "$DISPLAY"
  58. ### End vcard ### }}}
  59. ### Unidentified files ### {{{
  60. application/octet-stream; ~/.mutt/view_attachment.sh %s "-"
  61. ### End Unidentified ### }}}
  62. ### notes
  63. #look up all text
  64. #look up vcards
  65. #look up pkcs?
  66. #look up postscript, and other pdf lieks?
  67. #view contents of compressed files?
  68. #