better mailcap for html and media

This commit is contained in:
Luke Smith 2018-10-07 15:43:44 -04:00
parent baba4c6a74
commit 20c014db09
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
2 changed files with 14 additions and 3 deletions

10
etc/htmlopen.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Helps open an HTML file from mutt in a GUI browser without weird side effects.
file=$(mktemp -u --suffix=.html)
echo $file
cp "$1" "$file"
setsid firefox "$file" &

View File

@ -1,6 +1,7 @@
text/plain; vim %s ;
text/html; $BROWSER '%s' ;
text/html; ~/.config/mutt/etc/htmlopen.sh %s ;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
image/*; ~/.config/mutt/etc/muttimage.sh %s ; copiousoutput
video/*; setsid nohup mpv --quiet %s & disown; copiousoutput
application/pdf; pdftotext '%s' -; copiousoutput;
video/*; setsid mpv --quiet %s &; copiousoutput
application/pdf; cp '%s' /tmp/doc.pdf && setsid zathura /tmp/doc.pdf &; copiousoutput;
application/pgp-encrypted; gpg -d '%s'; copiousoutput;