12345678910111213141516171819202122 |
- #!/bin/sh
- nsxiv="png jpg jpeg jpe webp gif"
- zathura="pdf"
- mpv="mkv mp4 webm mp3 opus flac"
- vidsites="youtube.com
- \|yewtu.be"
- ext="${1##*.}"
- if echo "$nsxiv" | grep -w "$ext" > /dev/null; then
- $IMAGE_URL "$1" >/dev/null &
- elif echo "$zathura" | grep -w "$ext" > /dev/null; then
- curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && $PDF "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 &
- elif echo "$mpv" | grep -w "$ext" > /dev/null; then
- $VIDEO "$1" > /dev/null &
- elif echo "$@" | grep "$vidsites">/dev/null; then
- $VIDEO "$1" > /dev/null &
- else
- $BROWSER "$1" >/dev/null &
- fi
|