diff options
author | xyz <gky44px1999@gmail.com> | 2021-08-25 19:13:10 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-08-25 19:13:10 -0700 |
commit | 586f8fcf7d665eb9647bac368c72d93d1ee60ecd (patch) | |
tree | 4cb0a2f203f0bc126811738bc24e5053fd48a1b9 /.local | |
parent | 08aa1d8af8e4f46eb6b66a1993774bca091127d7 (diff) |
mpv play music wrapper
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/mpvm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/mpvm b/.local/bin/mpvm new file mode 100755 index 00000000..268fe921 --- /dev/null +++ b/.local/bin/mpvm @@ -0,0 +1,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 |