diff options
author | sinanmohd <sinan@firemail.cc> | 2023-05-17 12:33:09 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-05-17 12:33:09 +0530 |
commit | 37a40ad9a5d85a6f6151a3409f1a9dcf630f7be6 (patch) | |
tree | 584d4577b997ed2e1e849a29277fad2da47861f1 /.local/bin | |
parent | 1202435746168a2af28437a6152e800498419cb2 (diff) |
linkhandler: add support for .onion links, ignore / at the end
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/linkhandler | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index 361a09f..392f137 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -11,7 +11,7 @@ main() [ -z "$1" ] && exec "${BROWSER:-firefox}" - case "$1" in + case "${1%/}" in *mp3|*flac|*opus|*mkv|*webm|*mp4|*youtube.com/watch*|\ *youtube.com/playlist*|*youtu.be*|*bitchute.com*|*videos.lukesmith.xyz*|\ *piped.kavin.rocks*|*inv.vern.cc*|*yewtu.be*) @@ -28,6 +28,9 @@ main() curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && exec "$TERMINAL" -e xdg-open "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" > /dev/null 2>&1 & ;; + *.onion) + exec tor-browser "$1" >/dev/null 2>&1 + ;; *) exec "$BROWSER" "$1" >/dev/null 2>&1 ;; |