README.md: MPD-example added

This commit is contained in:
Denis Knauf 2010-04-07 00:14:20 +02:00
parent 4402b8c521
commit 278a2ea3f3

View file

@ -15,3 +15,18 @@ Usage
if event.name == "play" if event.name == "play"
system "xmms", "/av/music/3.mod" system "xmms", "/av/music/3.mod"
end end
Control your MPD:
require 'lirc'
lirc = LIRC::Client.new
lirc.each do |event|
case event.name
when "play"
system "mpc", "play"
when "pause"
system "mpc", "pause"
when "stop"
system "mpc", "stop"
end
end