Last active 1731170984

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