From: Arun Prakash Jana <engineerarun@gmail.com>
Date: Sat, 20 Apr 2019 12:13:13 +0000 (+0530)
Subject: Plugin music: play random music from current dir
X-Git-Tag: v2.5~91
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=bd29368d4cfbce8b20b5aedfc024a965205002e7;p=nnn.git

Plugin music: play random music from current dir
---

diff --git a/plugins/README.md b/plugins/README.md
index 0fa28ddb..98775638 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -1,5 +1,6 @@
 | Plugin (a-z) | Lang | Deps | Description |
 | --- | --- | --- | --- |
+| boom | sh | SMPlayer | Play random music from current dir (modify `PLAYER`) |
 | fzy-edit | sh | fzy | Fuzzy find a file in directory subtree and edit in vim |
 | fzy-open | sh | fzy | Fuzzy find a file in directory subtree and open using xdg-open |
 | getplugs | sh | wget | Update plugins |
diff --git a/plugins/boom b/plugins/boom
new file mode 100755
index 00000000..ef898dbb
--- /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
diff --git a/plugins/ipinfo b/plugins/ipinfo
index 9ee1ca90..b743df89 100755
--- a/plugins/ipinfo
+++ b/plugins/ipinfo
@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-# Description: Shows the IP address and whois information.
+# Description: Shows the IP address and whois information. Useful over VPNs.
 #
 # Shell: POSIX compliant
 # Author: Arun Prakash Jana