aboutsummaryrefslogtreecommitdiff
path: root/newsboat-browser
blob: 08fe3128b5489243dc69d9f9c3562a0f9367bcd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

# try to use the right browser

# path of file
URL="$1"

# 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 "$1"
   ;;

   www.diplomatie.gouv.fr )
      rdrview -T title,body -B cha "$1"
   ;;
   *) 
      cha "$1"
   ;; 
esac