#!/bin/bash # try to use the right browser # path of file URL="$@" # get domain name URL="${URL#*://}" URL=${URL%%/*} case $URL in www.youtube.com | youtube.com | youtu.be ) echo "Video loading, please wait..." mpv --really-quiet --no-terminal $@ ;; www.diplomatie.gouv.fr ) rdrview -T title,body -B cha $@ ;; *) cha $@ ;; esac