From f2d9346a6b69d9075c66e8c58ef3c7d5f8f3a7bb Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Gasull Date: Tue, 20 Nov 2018 11:12:43 +0800 Subject: [PATCH 1/4] copiousoutput HTML, qvm-open-in-dvm the rest --- configuration/mutt.md | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/configuration/mutt.md b/configuration/mutt.md index 0ae3f94e..c77b56bd 100644 --- a/configuration/mutt.md +++ b/configuration/mutt.md @@ -194,29 +194,7 @@ In `.urlview`: In `.mailcap`: - ### TODO: override most/all default mailcap settings to prevent + ### override all default mailcap settings to prevent ### opening in muttvm - ### is there a way to do this polymorphically? i.e. not - ### listing every damn mimetype by hand - ### - ### also would be convenient to use mailcap's TEST feature to - ### show some html in mutt pager (e.g. with w3m, links or html2text), - ### else open others in dispvm - - # MS Word documents - application/msword; qvm-open-in-dvm %s - - application/vnd.oasis.opendocument.spreadsheet; qvm-open-in-dvm %s - application/vnd.oasis.opendocument.text; qvm-open-in-dvm %s - - # Images - image/jpg; qvm-open-in-dvm %s - image/jpeg; qvm-open-in-dvm %s - image/png; qvm-open-in-dvm %s - image/gif; qvm-open-in-dvm %s - - # PDFs - application/pdf; qvm-open-in-dvm %s - - # HTML - text/html; qvm-open-in-dvm %s + text/html; w3m '%s' | cat --squeeze-blank; nametemplate=%s.html; copiousoutput + */*; qvm-open-in-dvm xdg-open '%s'; test=test -n "$DISPLAY" From 2e056ffd5205783c608efd1e8215ce2b2d5c6487 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Gasull Date: Wed, 21 Nov 2018 23:16:05 +0800 Subject: [PATCH 2/4] Update mutt.md --- configuration/mutt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/mutt.md b/configuration/mutt.md index c77b56bd..acf0425e 100644 --- a/configuration/mutt.md +++ b/configuration/mutt.md @@ -196,5 +196,5 @@ In `.mailcap`: ### override all default mailcap settings to prevent ### opening in muttvm - text/html; w3m '%s' | cat --squeeze-blank; nametemplate=%s.html; copiousoutput + text/html; w3m -T text/html '%s' | cat --squeeze-blank; nametemplate=%s.html; copiousoutput */*; qvm-open-in-dvm xdg-open '%s'; test=test -n "$DISPLAY" From 414ef7bc190fe2f124766eb44c8aa86bb6ed486a Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Gasull Date: Wed, 28 Nov 2018 18:43:04 +0800 Subject: [PATCH 3/4] Add only copiousoutput for HTML --- configuration/mutt.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/configuration/mutt.md b/configuration/mutt.md index acf0425e..a54f8836 100644 --- a/configuration/mutt.md +++ b/configuration/mutt.md @@ -194,7 +194,25 @@ In `.urlview`: In `.mailcap`: - ### override all default mailcap settings to prevent + ### TODO: override most/all default mailcap settings to prevent ### opening in muttvm + ### is there a way to do this polymorphically? i.e. not + ### listing every damn mimetype by hand + ### + ### also would be convenient to use mailcap's TEST feature to + ### show some html in mutt pager (e.g. with w3m, links or html2text), + ### else open others in dispvm + # MS Word documents + application/msword; qvm-open-in-dvm %s + application/vnd.oasis.opendocument.spreadsheet; qvm-open-in-dvm %s + application/vnd.oasis.opendocument.text; qvm-open-in-dvm %s + # Images + image/jpg; qvm-open-in-dvm %s + image/jpeg; qvm-open-in-dvm %s + image/png; qvm-open-in-dvm %s + image/gif; qvm-open-in-dvm %s + # PDFs + application/pdf; qvm-open-in-dvm %s + # HTML text/html; w3m -T text/html '%s' | cat --squeeze-blank; nametemplate=%s.html; copiousoutput - */*; qvm-open-in-dvm xdg-open '%s'; test=test -n "$DISPLAY" + text/html; qvm-open-in-dvm %s From e2d66857b39ec7c45d6d1062d7a1fa419f29fffb Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Gasull Date: Wed, 28 Nov 2018 18:43:50 +0800 Subject: [PATCH 4/4] Add blank lines back --- configuration/mutt.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configuration/mutt.md b/configuration/mutt.md index a54f8836..9b57d77f 100644 --- a/configuration/mutt.md +++ b/configuration/mutt.md @@ -202,17 +202,21 @@ In `.mailcap`: ### also would be convenient to use mailcap's TEST feature to ### show some html in mutt pager (e.g. with w3m, links or html2text), ### else open others in dispvm + # MS Word documents application/msword; qvm-open-in-dvm %s application/vnd.oasis.opendocument.spreadsheet; qvm-open-in-dvm %s application/vnd.oasis.opendocument.text; qvm-open-in-dvm %s + # Images image/jpg; qvm-open-in-dvm %s image/jpeg; qvm-open-in-dvm %s image/png; qvm-open-in-dvm %s image/gif; qvm-open-in-dvm %s + # PDFs application/pdf; qvm-open-in-dvm %s + # HTML text/html; w3m -T text/html '%s' | cat --squeeze-blank; nametemplate=%s.html; copiousoutput text/html; qvm-open-in-dvm %s