dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: e71dab28f9b5340994aa65fefddffa5efac4aa5f
Parent: ab307792a3e70aa8af6098a26291b2d18e0d4a45
Author: Randy Palamar
Date:   Sun, 14 May 2023 10:17:32 -0600

add plumb script for routing urls/file paths

Diffstat:
Abin/plumb | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/bin/plumb b/bin/plumb @@ -0,0 +1,19 @@ +#!/bin/sh + +# reads urls or file paths on stdin +# routes them to the appropriate program + +while read -r p ; do + case "$p" in + *mkv|*webm|*mp4|*youtube.com*|*youtu.be*|*videos.lukesmith.xyz*|*odysee.com*) + setsid -f mpv --no-terminal "$p" ;; + *png|*jpg|*jpe|*jpeg|*gif) + setsid -f mvi "$p" ;; + *pdf) + page "$p" ;; + *mp3|*flac|*opus|*ogg|*mp3?source*) + setsid -f mpv --no-terminal "$p" ;; + *) + setsid -f "$BROWSER" "$p" ;; + esac +done