Wikia

Music Player Daemon Community Wiki

Watchlist Recent changes

Hack:mpd-new-track.sh

Code Edit

#!/bin/sh
# Display an OSD when the track is changed
function setNewOSD ()
{
  tmp=/tmp/mpd-new-track.sh
  currentTrack=`mpc | head -1`
  lastTrack=`cat $tmp`
  echo "$currentTrack" > $tmp
  [ "$currentTrack" != "$lastTrack" ] && mpd-osd.sh&
}
while sleep 1
  do
  setNewOSD
done

Usage Edit

Create mpd-osd.sh with code from Hack:mpd-osd.sh (first variant), make it executable and place in same directory with this one or you could yuse full path to script in line 9:

  [ "$currentTrack" != "$lastTrack" ] && /path/mpd-osd.sh&

Pages on Music Player Daemon Community Wiki

Add a Page
543pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
114photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki