From bd29368d4cfbce8b20b5aedfc024a965205002e7 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 20 Apr 2019 17:43:13 +0530 Subject: Plugin music: play random music from current dir --- plugins/boom | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 plugins/boom (limited to 'plugins/boom') diff --git a/plugins/boom b/plugins/boom new file mode 100755 index 0000000..ef898db --- /dev/null +++ b/plugins/boom @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# Description: Play random music from current directory. Identifies MP3, FLAC, WEBM, WMA. +# You may want to change the PLAYER. +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +PLAYER=smplayer + +find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n 100 | xargs -d "\n" "$PLAYER" > /dev/null 2>&1 & +disown -- cgit v1.2.3-70-g09d2