summaryrefslogtreecommitdiff
path: root/.local/bin/linkhandler
diff options
context:
space:
mode:
authorJackson Taylor <jackson@jacksontaylor.xyz>2022-02-03 22:22:11 -0500
committerJackson Taylor <jackson@jacksontaylor.xyz>2022-02-03 22:28:08 -0500
commit7888574b1c18c77b75e5c6c5930cd0709f16898a (patch)
treeed4214ac5696c5641a1d8e3d335d68f7ca72f6d2 /.local/bin/linkhandler
parent7434b9127257627a48b7520effd46fb389f1fddd (diff)
Catching upHEADmaster
Diffstat (limited to '.local/bin/linkhandler')
-rwxr-xr-x.local/bin/linkhandler11
1 files changed, 6 insertions, 5 deletions
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
index 7c7e96f..fa74caf 100755
--- a/.local/bin/linkhandler
+++ b/.local/bin/linkhandler
@@ -10,13 +10,14 @@
[ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
- *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*)
+ *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif)
- curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;
+ curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
+ *pdf|*cbz|*cbr)
+ curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
- setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;;
+ qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
*)
- if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1"
- else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;;
+ [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
esac