From ef743a2a6037426e734a347719704ae741beb603 Mon Sep 17 00:00:00 2001 From: pks Date: Sat, 31 Dec 2022 00:40:51 +0100 Subject: browser: macos --- browser | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- cgit v1.2.3