diff options
author | pks <pks@pks.rocks> | 2022-12-31 00:40:51 +0100 |
---|---|---|
committer | pks <pks@pks.rocks> | 2022-12-31 00:40:51 +0100 |
commit | ef743a2a6037426e734a347719704ae741beb603 (patch) | |
tree | 66778343668d687afa973366189566100b5423c3 | |
parent | 53e41fb461bb71fb15e1f3cc0df3fb7760c590dc (diff) |
browser: macos
-rwxr-xr-x | browser | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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 |