From 751d8cb3514cdb60663e2e4ede99dd767c138396 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 25 Aug 2021 16:00:22 -0400 Subject: [PATCH] mailcap-epiphany: add mailcap file that text/html via Epiphany. Using the Epiphany browser to read HTML attachments is not as easy as you'd think. Here we add a special mailcap file that manages it. To Use it, symlink it to ~/.mailcap or something like that. --- mailcap-epiphany | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 mailcap-epiphany diff --git a/mailcap-epiphany b/mailcap-epiphany new file mode 100644 index 0000000..11c4c9a --- /dev/null +++ b/mailcap-epiphany @@ -0,0 +1,9 @@ +# We avoid using "nametemplate" because it uses a predictable filename +# under /tmp. The "needsterminal" forces mutt to wait until you press +# Return before it deletes the file; otherwise, Epiphany will notice +# that it's gone and show you nothing. Finally, the call to "tidy" +# ensures that Epiphany will not balk at the invalid HTML prevalent in +# emails. We ignore errors in "tidy" because we expect a bunch of HTML +# warnings to remain. The weird subshell construct is there because I +# don't know how to escape a semicolon. +text/html; (tidy -quiet -modify %s || true) && /usr/bin/epiphany %s; description=HTML Text; test=test -n "$DISPLAY"; needsterminal; -- 2.43.2