aboutsummaryrefslogtreecommitdiff
path: root/bin/xgo
diff options
context:
space:
mode:
Diffstat (limited to 'bin/xgo')
-rwxr-xr-xbin/xgo14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/xgo b/bin/xgo
index 56bbb0f9..e808027c 100755
--- a/bin/xgo
+++ b/bin/xgo
@@ -11,23 +11,23 @@ for url ; do (
# If it's a YouTube video without a given start time, load it in mpv(1)
case $url in
- *youtube.com/watch*[?\&]t=) ;;
- *youtube.com/watch*)
- mpv -- "$url" && continue
+ *[/.]youtube.com/watch*[?\&]t=) ;;
+ *[/.]youtube.com/watch*)
+ mpv -- "$url" && exit
;;
esac
+ # Get the MIME type data
+ mt=$(urlmt "$url")
+
# If the MIME type is an image, load it in feh(1)
case $mt in
image/gif) ;;
image/*)
- curl -- "$url" | feh - && continue
+ curl -- "$url" | feh - && exit
;;
esac
- # Get the MIME type data
- mt=$(urlmt "$url")
-
# Otherwise, just pass it to br(1)
br "$url"
) & done