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

music=${1:-$(find "$XDG_MUSIC_DIR" | fzf)}

# use --loop-file for single file, better performance maybe
if [ -d "$music" ]; then
	mpv --shuffle --loop-playlist=inf --video=no "$music"
elif [ -f "$music" ]; then
	mpv --loop-file=inf --video=no "$music"
fi