plumber

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

commit a9eeb3d92434c6f7f9dd9a274103407fb95554c2
parent 8c400263765f8fa15b1113a230b4feea93b7bb8e
Author: parazyd <parazyd@dyne.org>
Date:   Fri, 15 May 2020 19:57:28 +0200

Use hurl(1) instead of curl(1).

Diffstat:
Mplumber | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/plumber b/plumber @@ -16,17 +16,17 @@ case "$clip" in gopher://*) case "$clip" in *.jpg|*.jpeg|*.JPG|*.JPEG|*.png|*.PNG) - curl -s "$clip" | feh - & + hurl "$clip" | feh - & ;; *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV) mpv "$clip" & ;; *.txt|*.TXT|*.vtt|*.VTT|*.vt|*.VT) - $TERMCMD sh -c "curl -s '$clip' | less" & + $TERMCMD sh -c "hurl '$clip' | less" & ;; *.gif|*.GIF) f="$(mktemp /tmp/XXXX.gif)" - curl -s "$clip" > "$f" + hurl "$clip" > "$f" sxiv -a "$f" rm -f "$f" ;; @@ -39,15 +39,15 @@ gopher://*) http://*|https://*) case "$clip" in *.jpg|*.jpeg|*.JPG|*.JPEG|*.png|*.PNG|\ - *twimg.com*) - curl -Ls "$clip" | feh - & + *twimg.com*|*scontent*.fbcdn.net/*) + hurl "$clip" | feh - & ;; *.mp4|*.MP4|*.webm|*.WEBM|*.mkv|*.MKV) mpv "$clip" & ;; *.gif|*.GIF) f="$(mktemp /tmp/XXXX.gif)" - curl -Ls "$clip" > "$f" + hurl "$clip" > "$f" sxiv -a "$f" rm -f "$f" ;;