summaryrefslogtreecommitdiff
path: root/.local/bin/mpvm
blob: 3dbfb1943f2c20b8372003b4c9674ebe92426ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if [ $# -eq 0 ]; then
	# fzf has --read0, maybe useful
	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