summary refs log tree commit diff
path: root/bin/play-music
diff options
context:
space:
mode:
Diffstat (limited to 'bin/play-music')
-rwxr-xr-xbin/play-music23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/play-music b/bin/play-music
new file mode 100755
index 0000000..14e91f1
--- /dev/null
+++ b/bin/play-music
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -eux
+
+music_dir=/run/media/robert/fwdrive/music
+
+mpa() {
+	mpv --profile=mpa \
+		--directory-filter-types=audio \
+		--autocreate-playlist=filter \
+		--wayland-app-id=mpv.play-music \
+		"$@"
+}
+
+case "$1" in
+shuffle)
+	mpa --shuffle $music_dir
+	;;
+select)
+	cd $music_dir
+	subdir=$(find . -type d -printf "%P\n" | shuf | fuzzel -d -w 80)
+	mpa "$subdir"
+	;;
+esac