tMore handlers. - plumber - simple plumber tool HTML git clone https://git.parazyd.org/plumber DIR Log DIR Files DIR Refs --- DIR commit 49b76bccd3d19c91ce4fd5b1a171275cebf28ac5 DIR parent a9eeb3d92434c6f7f9dd9a274103407fb95554c2 HTML Author: parazyd <parazyd@dyne.org> Date: Wed, 3 Feb 2021 15:54:22 +0100 More handlers. Diffstat: M plumber | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) --- DIR diff --git a/plumber b/plumber t@@ -13,12 +13,17 @@ fi TERMCMD="st -e" case "$clip" in -gopher://*) +gopher://*|gophers://) + if printf "%s" "$clip" | cut -d'/' -f3 | \ + xargs -i grep -q '{}' ~/.gophers-pins; then + clip="$(printf "%s" "$clip" | sed 's,gopher://,gophers://,')" + fi + case "$clip" in *.jpg|*.jpeg|*.JPG|*.JPEG|*.png|*.PNG) hurl "$clip" | feh - & ;; - *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV) + *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV|*.avi|*.AVI|*.wav|*.WAV) mpv "$clip" & ;; *.txt|*.TXT|*.vtt|*.VTT|*.vt|*.VT) t@@ -42,7 +47,8 @@ http://*|https://*) *twimg.com*|*scontent*.fbcdn.net/*) hurl "$clip" | feh - & ;; - *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV) + *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV|*.avi|*.AVI|*.wav|*.WAV|\ + *.mp3) mpv "$clip" & ;; *.gif|*.GIF) t@@ -68,6 +74,18 @@ ssh://*) $TERMCMD ssh "$clip" & ;; +*.jpg|*.jpeg|*.JPG|*.JPEG|*.png|*.PNG) + feh "$clip" & + ;; + +*.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV|*.avi|*.AVI|*.wav|*.WAV) + mpv "$clip" & + ;; + +*.gif|*.GIF) + sxiv "$clip" & + ;; + *) logger -s "plumber: no plumber for plumbed data" exit 1