dominic revised this gist . Go to revision
1 file changed, 22 insertions
mailopenhtml.sh(file created)
@@ -0,0 +1,22 @@ | |||
1 | + | #!/bin/sh | |
2 | + | # Open HTML mails with your browser (xdg-open) | |
3 | + | # | |
4 | + | # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com> | |
5 | + | ||
6 | + | BROWSER=xdg-open | |
7 | + | #BROWSER=firefox | |
8 | + | #BROWSER=librewolf | |
9 | + | #BROWSER=zen-browser | |
10 | + | #BROWSER=thorium-browser | |
11 | + | #BROWSER=chromium | |
12 | + | ||
13 | + | ID=$(echo $(date +%s) | sha1sum -z | awk '{ printf $1 }') | |
14 | + | FILEPATH=/tmp | |
15 | + | FILENAME=neomutt-${ID}.html | |
16 | + | FILE=${FILEPATH}/${FILENAME} | |
17 | + | ||
18 | + | cat $* > ${FILE} | |
19 | + | ${BROWSER} ${FILE} | |
20 | + | ||
21 | + | # this is much quicker than the browser could ever load the file... | |
22 | + | #rm -f ${FILE} |
Newer
Older