My build of nnn with minor changes
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

32 satır
816 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. NUMTRACKS=100
  9. if [ ! -z "$GUIPLAYER" ]; then
  10. PLAYER="$GUIPLAYER"
  11. find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n $NUMTRACKS | xargs -d "\n" "$PLAYER" > /dev/null 2>&1 &
  12. # detach the player
  13. sleep 1
  14. else
  15. # start MOC server
  16. mocp -S
  17. # clear MOC playlist
  18. mocp -c
  19. # add up to 100 random audio files
  20. find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n $NUMTRACKS | xargs -d "\n" mocp -a
  21. # start playing
  22. mocp -p
  23. fi