aboutsummaryrefslogtreecommitdiff
path: root/bin/,url_handler
diff options
context:
space:
mode:
Diffstat (limited to 'bin/,url_handler')
-rwxr-xr-xbin/,url_handler17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/,url_handler b/bin/,url_handler
new file mode 100755
index 0000000..510ed39
--- /dev/null
+++ b/bin/,url_handler
@@ -0,0 +1,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