diff --git a/.scripts/webview b/.scripts/linkhandler similarity index 79% rename from .scripts/webview rename to .scripts/linkhandler index 691e545..0e9e4d8 100755 --- a/.scripts/webview +++ b/.scripts/linkhandler @@ -12,18 +12,18 @@ vidsites="youtube.com \|bitchute.com " ext="${1##*.}" -mpvFiles="mkv mp4 gif" +mpvFiles="mkv mp4 gif webm" fehFiles="png jpg jpeg jpe" wgetFiles="mp3 flac opus mp3?source=feed pdf" if echo $fehFiles | grep -w $ext > /dev/null; then - feh "$1" >/dev/null & + feh "$1" >/dev/null & disown elif echo $mpvFiles | grep -w $ext > /dev/null; then - mpv --loop --quiet "$1" > /dev/null & + mpv -quiet "$1" > /dev/null & disown elif echo $wgetFiles | grep -w $ext > /dev/null; then - wget "$1" >/dev/null & + wget "$1" >/dev/null & disown elif echo "$@" | grep "$vidsites">/dev/null; then - mpv -quiet "$1" > /dev/null & + mpv -quiet "$1" > /dev/null & disown else $BROWSER "$1" 2>/dev/null & disown fi diff --git a/.urlview b/.urlview index 1fccb13..17f3ca2 100644 --- a/.urlview +++ b/.urlview @@ -25,5 +25,5 @@ REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t> #COMMAND lynx %s #COMMAND netscape -remote 'openURL(%s)' -COMMAND webview +COMMAND linkhandler