blob: cd096e14fb0d3e0515013e59328e974da5606dc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
ext="${1##*.}"
mpvfiles="avi flv mkv mov mpeg mpg mp4 rmvb webm wmv w3m ogv ts 3gp"
nsxivfiles="png jpg jpeg jpe gif bmp tiff tif"
wgetfiles="mp3 flac opus wav aac wma m4a mp3?source=feed"
if echo $mpvfiles | grep -w $ext >/dev/null; then
nohup mpv --loop --quiet "$1" >/dev/null 2>&1 &
elif echo $nsxivfiles | grep -w $ext >/dev/null; then
nohup nsxiv "$1" >/dev/null 2>&1 &
elif echo $wgetfiles | grep -w $ext >/dev/null; then
nohup wget "$1" >/dev/null 2>&1 &
else
nohup "$BROWSER" "$1" >/dev/null 2>&1 &
fi
|