aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/boom
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-04-20 17:43:13 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-04-20 18:12:52 +0530
commitbd29368d4cfbce8b20b5aedfc024a965205002e7 (patch)
treebba94997769a45ffde9a61c8c11ccd2a292a7abe /plugins/boom
parente1d8adce2f910caf3009e2a35032e76de73ba852 (diff)
downloadnnn-bd29368d4cfbce8b20b5aedfc024a965205002e7.tar.gz
Plugin music: play random music from current dir
Diffstat (limited to 'plugins/boom')
-rwxr-xr-xplugins/boom12
1 files changed, 12 insertions, 0 deletions
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