1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/private_dot_local/bin/executable_linkhandler

13 lines
446 B
Fish

#!/usr/bin/fish
switch $argv[1]
case '**.mkv' '**.webm' '**.mp4' '**youtube.com**' '**youtu.be**' '**hooktube.com**' '**bitchute.com**' '**lbry.tv**' '**.mp3' '**.flac'
setsid mpv --input-ipc-server=/tmp/mpvsoc"(date +%s)" -quiet "$argv[1]" >/dev/null 2>&1 &
case '*'
if [ -f $argv[1] ]
"$TERMINAL" -e "$EDITOR $argv[1]"
else
setsid "$BROWSER" "$argv[1]" >/dev/null 2>&1 &
end
end