blob: 254d582652d390507db5c86cd4a946cff266bf38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
if [ $# -eq 0 ]; then
# fzf has --read0, maybe useful
# may further improve it by consider fzf select only one file
find "$XDG_MUSIC_DIR" | fzf -m --print0 | xargs -0 mpv --shuffle --loop-playlist=inf --video=no
elif [ $# -eq 1 ]; then
# use --loop-file for single file, better performance maybe
mpv --loop-file=inf --video=no "$1"
else
mpv --shuffle --loop-playlist=inf --video=no "$@"
fi
|