diff options
Diffstat (limited to 'urlselect.sh')
-rwxr-xr-x | urlselect.sh | 9 |
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 |