diff options
Diffstat (limited to 'bin/xgo.sh')
-rw-r--r-- | bin/xgo.sh | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -39,7 +39,7 @@ for url do ( # mpv(1) (*[/.]youtube.com/watch*[?\&]t=) ;; (*[/.]youtube.com/watch*) - exec mpv -- "$url" + exec mpv --force-window --no-terminal -- "$url" ;; esac @@ -59,14 +59,15 @@ for url do ( ) ;; - # Open audio and video in mpv(1); force a window even for audio so I - # can control it + # Open audio and video in mpv(1) (audio/*|video/*) - exec mpv --force-window -- "$url" + exec mpv --force-window --no-terminal -- "$url" ;; - # If the MIME type is an image that is not a GIF, load it in feh(1) - (image/gif) ;; + # Open GIFs with a looping mpv(1), and all other images with feh(1) + (image/gif) + exec mpv --force-window --loop=inf --no-terminal -- "$url" + ;; (image/*) exec curl -- "$url" | feh - ;; @@ -74,7 +75,7 @@ for url do ( # Open plain text in a terminal view(1) (text/plain) # shellcheck disable=SC2016 - exec urxvt -e sh -c 'curl -- "$1" | view -' _ "$url" + exec x-terminal-emulator -e sh -c 'curl -- "$1" | view -' _ "$url" ;; # Otherwise, just pass it to br(1df) |