aboutsummaryrefslogtreecommitdiff
path: root/bin/,url_handler
blob: 510ed39f93234df2fb6f3e715b836ceb6a024110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/env bash

# manage the program in which the url should be displayed in
# intended use with programs such as urlscan or urlview

urlname="$(basename "$1")"

case "$urlname" in
    *.jpg) urlImage "$1";;
		*.jpeg) urlImage "$1";;
		*.png) urlImage "$1";;
		*.html) "$BROWSER_CLI"-I "UTF-8" -T text/html "$1";;
    *.mp4) mpv "$1";;
    *.mp3) mpv "$1";;
    *.webm) mpv "$1";;
		*) "$BROWSER" "$1"
esac