summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2022-12-31 00:40:51 +0100
committerpks <pks@pks.rocks>2022-12-31 00:40:51 +0100
commitef743a2a6037426e734a347719704ae741beb603 (patch)
tree66778343668d687afa973366189566100b5423c3
parent53e41fb461bb71fb15e1f3cc0df3fb7760c590dc (diff)
browser: macos
-rwxr-xr-xbrowser17
1 files changed, 17 insertions, 0 deletions
diff --git a/browser b/browser
index 278d916..f6392e7 100755
--- a/browser
+++ b/browser
@@ -1,5 +1,9 @@
#!/usr/bin/env zsh
+platform=$(uname)
+
+if [[ "$platform" == "Linux" ]]; then
+
# To use mpv for youtube links
if [[ $1 != "" ]]; then
if printf $1 2>/dev/null | grep -q "youtube.com"; then
@@ -31,3 +35,16 @@ case "$1" in
TZ=UTC GDK_SCALE=$SCALE GDK_DPI_SCALE=$SCALE /usr/bin/env $bin -new-tab $@
;;
esac
+
+elif [[ "$platform" == "Darwin" ]]; then
+case "$1" in
+ *tmp/pks/mutt/*)
+ cp $1 $1.html
+ open -j -a "Firefox" "$1.html"
+ ;;
+ *)
+ open -j -a "Firefox" "$1"
+ ;;
+esac
+return 0
+fi