added config file and support for browser

This commit is contained in:
Emma Tebibyte 2022-09-02 01:34:11 -04:00
parent 24a07a5e02
commit aa8cecba5a

View File

@ -1,7 +1,13 @@
#!/bin/sh
echo "Determining MIME type of $1:"
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r')
echo $MIME
BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p')
if [ "$MIME" = "text/html" ]
then
$BROWSER $1