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

13 lines
446 B
Fish
Executable File

#!/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