README.md: MPD-example added
This commit is contained in:
parent
4402b8c521
commit
278a2ea3f3
15
README.md
15
README.md
|
@ -15,3 +15,18 @@ Usage
|
|||
if event.name == "play"
|
||||
system "xmms", "/av/music/3.mod"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue