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

13 lines
446 B
Plaintext
Raw Normal View History

2020-02-22 19:40:41 +00:00
#!/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