summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2020-11-10 12:17:31 +0100
committerpks <pks@pks.rocks>2020-11-10 12:17:31 +0100
commita324b25a1fbe36455938b97a9a8d64585a78e3e6 (patch)
tree3f47514b4a03a4cc2be51e47c2e83c220f37704b
parent47b87996a9585d947700996b098cef3111eb32b4 (diff)
browser: comments and copy mutt html
-rwxr-xr-xbrowser13
1 files changed, 12 insertions, 1 deletions
diff --git a/browser b/browser
index ccdfa8a..6323c4e 100755
--- a/browser
+++ b/browser
@@ -8,15 +8,26 @@ if [[ $1 != "" ]]; then
fi
fi
+# scale on highres displays
if [[ $(dpi) -gt 120 ]]; then
SCALE=1.4
else
SCALE=1.0
fi
+# maybe use firefox distributed in binary
bin=$(which firefox)
if [[ $? -eq 1 ]]; then
bin=$(which firefox-bin)
fi
-TZ=UTC GDK_SCALE=$SCALE GDK_DPI_SCALE=$SCALE /usr/bin/env $bin $@
+# for mutt copy the file before it disappears
+case "$1" in
+ *tmp/pks/mutt/*)
+ cp $1 $1.html
+ TZ=UTC GDK_SCALE=$SCALE GDK_DPI_SCALE=$SCALE /usr/bin/env $bin -new-tab $1.html
+ ;;
+ *)
+ TZ=UTC GDK_SCALE=$SCALE GDK_DPI_SCALE=$SCALE /usr/bin/env $bin $@
+ ;;
+esac