From 40decbd7692d9c08ed25ad3e39b16af084c8be44 Mon Sep 17 00:00:00 2001 From: Schark Date: Tue, 5 Dec 2023 21:47:49 -0800 Subject: Init scripts --- random-music | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 random-music (limited to 'random-music') 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 -- cgit v1.2.3-18-g5258