aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/boom
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-27 00:05:11 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-27 00:05:40 +0530
commiteec0e6d18ef03ec85772606521f2f141b0d4a1a3 (patch)
treeeb12e485c6323d482462575ffe37efb17bfee3ec /plugins/boom
parentbabf379a74c6727b82ba593ca952be3a0bba50e3 (diff)
downloadnnn-eec0e6d18ef03ec85772606521f2f141b0d4a1a3.tar.gz
Various plugin improvements
Diffstat (limited to 'plugins/boom')
-rwxr-xr-xplugins/boom6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/boom b/plugins/boom
index 14f481d..aa77634 100755
--- a/plugins/boom
+++ b/plugins/boom
@@ -10,7 +10,7 @@ GUIPLAYER="${GUIPLAYER}"
NUMTRACKS="${NUMTRACKS:-100}"
if [ ! -z "$GUIPLAYER" ]; then
- find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" "$GUIPLAYER" > /dev/null 2>&1 &
+ find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" "$GUIPLAYER" > /dev/null 2>&1 &
# detach the player
sleep 1
@@ -26,7 +26,7 @@ elif which mocp >/dev/null 2>&1; then
state=$(mocp -i | grep "State:" | cut -d' ' -f2)
if [ "$state" = 'PLAY' ]; then
# add up to 100 random audio files
- find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" mocp -a
+ find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" mocp -a
exit
fi
fi
@@ -35,7 +35,7 @@ elif which mocp >/dev/null 2>&1; then
mocp -c
# add up to 100 random audio files
- find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" mocp -a
+ find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" mocp -a
# start playing
mocp -p