From 0a043dbb7259cc59ac56b31573469f445a7921ed Mon Sep 17 00:00:00 2001 From: mono-b Date: Sun, 18 Dec 2022 23:00:24 -0300 Subject: up --- urlselect.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 urlselect.sh (limited to 'urlselect.sh') diff --git a/urlselect.sh b/urlselect.sh new file mode 100755 index 0000000..69359aa --- /dev/null +++ b/urlselect.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +ext="${1##*.}" + +case $ext in + mp4|webm|jpeg|jpg|png|webp|mp3|opus|gif) setsid -f mpv --loop "$1" > /dev/null 2>&1 ;; + pdf|epub) setsid -f zathura "$1" > /dev/null 2>&1 ;; + *) setsid -f $BROWSER --new-tab "$1" > /dev/null 2>&1 ;; +esac -- cgit v1.2.1