summaryrefslogtreecommitdiff
path: root/urlselect.sh
diff options
context:
space:
mode:
authormono-b <monoblanco@DRAINERDOMAIN.localdomain>2022-12-18 23:00:24 -0300
committermono-b <monoblanco@DRAINERDOMAIN.localdomain>2022-12-18 23:00:24 -0300
commit0a043dbb7259cc59ac56b31573469f445a7921ed (patch)
tree28e87b1b7bbc035fbc467d5a7fc63204960dc247 /urlselect.sh
up
Diffstat (limited to 'urlselect.sh')
-rwxr-xr-xurlselect.sh9
1 files changed, 9 insertions, 0 deletions
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