diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-05-19 20:05:14 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-05-19 20:05:14 -0400 |
| commit | c6e69e96421ebf192eb6de537324e269e7bfda78 (patch) | |
| tree | 47d34a5ff72d65be9a3e2c6aeb55a88da3a6fbd2 /.local/bin/tools/linkhandler | |
| parent | bf8c6b1e20f42a7725d8d919830fdb274596b20f (diff) | |
| download | eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.tar.gz eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.tar.zst eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.zip | |
massive cleanup
Diffstat (limited to '.local/bin/tools/linkhandler')
| -rwxr-xr-x | .local/bin/tools/linkhandler | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/.local/bin/tools/linkhandler b/.local/bin/tools/linkhandler deleted file mode 100755 index c616d04..0000000 --- a/.local/bin/tools/linkhandler +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Feed script a url or file location. -# If an image, it will view in sxiv, -# if a video or gif, it will view in mpv -# if a music file or pdf, it will download, -# otherwise it opens link in browser. - -# If no url given. Opens browser. For using script as $BROWSER. -[ -z "$1" ] && { "$BROWSER"; exit; } - -case "$1" in - *mkv|*webm|*mp4|*youtube.com*|*youtu.be*|*hooktube.com*|*bitchute.com*) - setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -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 & ;; - *mp3|*flac|*opus|*mp3?source*) - setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;; - *) - if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1" - else setsid "$BROWSER" "$1" >/dev/null 2>&1 & fi ;; -esac |
