plumber

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

commit 02226c3b9d3542bb4a144ecf000900acde5d90c5
parent d7c1dafda499642daf24a897e84ef5c75a493688
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 16 Mar 2020 14:05:23 +0100

Update plumber.

Diffstat:
Mp | 65++++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 34 insertions(+), 31 deletions(-)

diff --git a/p b/p @@ -19,35 +19,38 @@ fi termcmd="st -e" case "$clip" in - - gopher://*/I/*) - curl "$clip" | feh - - ;; - - gopher://*) - $termcmd sacc "$clip" - ;; - ssh://*) - $termcmd ssh "$clip" - ;; - https://www.youtube.com/*|ytdl://) - mpv "$clip" - ;; - - *.jpg|*.png|*.JPG|*.JPEG|*.PNG) - feh "$clip" - ;; - - *.mp4|*.webm) - mpv "$clip" - ;; - - *.gif|*.GIF) - mpv --loop "$clip" - ;; - - *) - printf "plumber: no plumber for %s\n" "$clip" >&2 - exit 1 - ;; +gopher://*/I/*) + curl "$clip" | feh - + ;; +gopher://*) + $termcmd sacc "$clip" + ;; +ssh://*) + $termcmd ssh "$clip" + ;; +telnet://*) + $termcmd telnet "$clip" + ;; +https://www.youtube.com/*|ytdl://) + mpv "$clip" + ;; +*.jpg|*.jpeg|*.png|*.JPG|*.JPEG|*.PNG) + feh "$clip" + ;; +*.mp4|*.webm|*.mkv) + mpv "$clip" + ;; +*.gif|*.GIF) + mpv --loop "$clip" + ;; +*.txt) + less "$clip" + ;; +http://*|https://*) + ff --new-tab "$clip" + ;; +*) + printf "plumber: no plumber for %s\n" "$clip" >&2 + exit 1 + ;; esac