summaryrefslogtreecommitdiff
path: root/random-music
diff options
context:
space:
mode:
Diffstat (limited to 'random-music')
-rwxr-xr-xrandom-music12
1 files changed, 12 insertions, 0 deletions
diff --git a/random-music b/random-music
new file mode 100755
index 0000000..f06ee8c
--- /dev/null
+++ b/random-music
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "No song amount provided. Defaulting to 10."
+ arg=10
+else
+ arg=$1
+fi
+
+find /mnt/music/ -type f -name "*.*" | shuf -n $arg | mpv --playlist=- --no-audio-display
+
+exit 0