Add webview script for urlview

This commit is contained in:
krrishg
2020-08-15 12:38:27 +05:45
parent 3b31ab5964
commit 0e0b1515b3

16
webview Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
ext="${1##*.}"
images="png jpg jpeg"
videos="mkv mp4 gif"
download="mp3 flac pdf"
if echo $images | grep -w $ext > /dev/null; then
tsp feh "$1" > /dev/null &
elif echo $videos | grep -w $ext > /dev/null; then
tsp mpv --quiet "$1" > /dev/null &
elif echo $download | grep -w $ext > /dev/null; then
tsp wget "$1" > /dev/null &
else
tsp $BROWSER "$1" > /dev/null &
fi