plumber

simple plumber tool
git clone https://git.parazyd.org/plumber
Log | Files | Refs

commit 49b76bccd3d19c91ce4fd5b1a171275cebf28ac5
parent a9eeb3d92434c6f7f9dd9a274103407fb95554c2
Author: parazyd <parazyd@dyne.org>
Date:   Wed,  3 Feb 2021 15:54:22 +0100

More handlers.

Diffstat:
Mplumber | 24+++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/plumber b/plumber @@ -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) @@ -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) @@ -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