dotfiles

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

plumb (466B)


      1 #!/bin/sh
      2 
      3 # reads urls or file paths on stdin
      4 # routes them to the appropriate program
      5 
      6 while read -r p ; do
      7 	case "$p" in
      8 	*mkv|*webm|*mp4|*youtube.com*|*youtu.be*|*videos.lukesmith.xyz*|*odysee.com*)
      9 		setsid -f mpv --no-terminal "$p" ;;
     10 	*png|*jpg|*jpe|*jpeg|*gif)
     11 		setsid -f mpv --profile=image --no-terminal "$p" ;;
     12 	*pdf)
     13 		page "$p" ;;
     14 	*mp3|*flac|*opus|*ogg|*mp3?source*)
     15 		setsid -f mpv --no-terminal "$p" ;;
     16 	*)
     17 		setsid -f "$BROWSER" "$p" ;;
     18 	esac
     19 done