My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

33 lignes
821 B

  1. #!/usr/bin/env sh
  2. # Description: Play random music from current directory. Identifies MP3, FLAC, WEBM, WMA.
  3. # You may want to set GUIPLAYER.
  4. #
  5. # Shell: POSIX compliant
  6. # Author: Arun Prakash Jana
  7. #GUIPLAYER=smplayer
  8. if [ ! -z "$GUIPLAYER" ]; then
  9. PLAYER="$GUIPLAYER"
  10. 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 &
  11. # detach the player
  12. disown
  13. else
  14. # exit MOC server
  15. mocp -x
  16. # start MOC server
  17. mocp -S
  18. # clear MOC playlist
  19. mocp -c
  20. # add up to 100 random audio files
  21. find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n 100 | xargs -d "\n" mocp -a
  22. # start playing
  23. mocp -p
  24. fi