|
ps, grep, kill, test, if...then...else...fi, mplayer flags. Those would be the main ingredients. Just grep ps for whether it's running and kill it if it is, and don't if it's not. The man pages for those items will give full details.
Ought to be an option to switch songs in mplayer, but I dunno - I use mplayer for video and xmms for audio.
|