Skip to content

Instantly share code, notes, and snippets.

@cwage
Created November 25, 2010 05:41
Show Gist options
  • Save cwage/714961 to your computer and use it in GitHub Desktop.
Save cwage/714961 to your computer and use it in GitHub Desktop.
#!/bin/bash
NUMFILES=`locatemp3 | grep "Full Albums" | wc -l`
WHICH=$((RANDOM % $NUMFILES))
WHAT=`locatemp3 | grep "Full Albums" | sed -n "${WHICH}p"`
WHERE=`dirname "$WHAT"`
echo Queueing $WHERE
xmms2 stop;xmms2 clear
xmms2 radd "$WHERE"
xmms2 play
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment