diff options
author | Schark <jordan@schark.online> | 2023-12-05 21:47:49 -0800 |
---|---|---|
committer | Schark <jordan@schark.online> | 2023-12-05 21:47:49 -0800 |
commit | 40decbd7692d9c08ed25ad3e39b16af084c8be44 (patch) | |
tree | 5989985e974d41d7d81c51ce7e78e76858ab1a93 /random-music | |
download | scripts-40decbd7692d9c08ed25ad3e39b16af084c8be44.tar.gz scripts-40decbd7692d9c08ed25ad3e39b16af084c8be44.zip |
Init scripts
Diffstat (limited to 'random-music')
-rwxr-xr-x | random-music | 12 |
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 |