nnn/plugins/boom
2019-04-20 18:12:52 +05:30

13 lines
400 B
Bash
Executable file

#!/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