mpd_playing.scm added by mario-goulart on Wed Dec 14 01:34:23 2011

(use (prefix mpd-client mpd:))

(define (nowplaying)
  (let* ((con (mpd:connect))
	 (status (mpd:get-status con)))
    (when (eqv? (alist-ref 'state status) 'play)
      (let ((title (alist-ref 'Title (mpd:get-current-song con))))
	(display (string-append "Playing: " title))))
    (mpd:disconnect con)))

(nowplaying)