diff options
Diffstat (limited to '.local/bin/mpva')
-rwxr-xr-x | .local/bin/mpva | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/mpva b/.local/bin/mpva new file mode 100755 index 00000000..0c775a50 --- /dev/null +++ b/.local/bin/mpva @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -eq 0 ]; then + # fzf has --read0, maybe useful + # may further improve it by consider fzf select only one file, seems hard without bashism array + find "$XDG_MUSIC_DIR" | fzf -m --print0 | xargs -0 mpv --af= --shuffle --loop-playlist=inf --video=no +elif [ $# -eq 1 ]; then + # use --loop-file for single file, better performance maybe + mpv --af= --loop-file=inf --video=no "$1" +else + mpv --af= --shuffle --loop-playlist=inf --video=no "$@" +fi |