aboutsummaryrefslogtreecommitdiff
path: root/muttrc.dot.link
diff options
context:
space:
mode:
Diffstat (limited to 'muttrc.dot.link')
-rw-r--r--muttrc.dot.link40
1 files changed, 32 insertions, 8 deletions
diff --git a/muttrc.dot.link b/muttrc.dot.link
index 9af1163..2a976ca 100644
--- a/muttrc.dot.link
+++ b/muttrc.dot.link
@@ -37,10 +37,41 @@ set charset = "utf-8"
# ----------------------
# OS Specifiques options
# ----------------------
-set print = ask-no
set ispell="aspell -e -c --lang=pt_BR"
set spoolfile = "~/mail/INBOX"
+# --------
+# Printing
+# --------
+
+# Disable printing entirely
+#bind index p noop
+#bind pager p noop
+#bind pager P noop
+
+# Always ask for confirmation
+set print = ask-no
+
+# Muttprint
+# See https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt
+# https://muttprint.sourceforge.net/
+#
+# Display the PDF after printing it
+#set print_command='set -e; mkdir -p "$HOME"/.cache/mutt; f=`mktemp -p "$HOME"/.cache/mutt`; \
+# muttprint -P A4 -p TO_FILE:"$f"; zathura "$f"; rm "$f"'
+#
+# Simply produce the PDF
+# Needs additional tuning on the mutt firejail profile in order to work
+#set print_command='set -e; mkdir -p "$HOME"/.cache/mutt; f=`mktemp -p "$HOME"/.cache/mutt muttprint.XXXX.ps`; \
+# muttprint -P A4 -p TO_FILE:"$f"; ps2pdf "$f"; echo Saved output into `basename "$f" .ps`.pdf'
+
+# Simply output the message to a file
+set print_command='set -e; mkdir -p "$HOME"/.cache/mutt; f=`mktemp -p "$HOME"/.cache/mutt muttprint.XXXX.txt`; \
+ cat - > "$f"; echo Saved output into "$f" \
+ echo You convert it to a PDF using the following command: ; \
+ echo "" ; \
+ echo "cat $f | muttprint -P A4 -p TO_FILE:$f.ps ; ps2pdf $f.ps"'
+
# ----------
# Menu index
# ----------
@@ -323,13 +354,6 @@ macro pager X "<enter-command>unset wait_key\n<pipe-entry>bogofilter -MNs\n<ente
macro index H "<enter-command>unset wait_key\n<pipe-entry>bogofilter -n\n" "Learn as ham and save"
macro pager H "<enter-command>unset wait_key\n<pipe-entry>bogofilter -n\n" "Learn as ham and save"
-# ----------------
-# Disable printing
-# ----------------
-bind index p noop
-bind pager p noop
-bind pager P noop
-
# ----------------------------------------------------------------
# Schleuder config
#