You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
13 years ago | |
---|---|---|
examples | 14 years ago | |
lib | 13 years ago | |
test | 17 years ago | |
AUTHORS | 13 years ago | |
LICENSE | 17 years ago | |
README.md | 13 years ago | |
Rakefile | 13 years ago | |
VERSION | 13 years ago |
README.md
Description
lircr (pronounced 'lurker') is a LIRC client library for Ruby. It is simple, it is easy, it is fun. If you got LIRC, get lircr. I am not responsible if you grow more hair on your index finger or thumb.
Usage
require 'lirc'
lirc = LIRC::Client.new
event = lirc.next
p event
if event.name == "play"
system "xmms", "/av/music/3.mod"
end
Control your MPD:
require 'lirc'
require 'librmpd'
lirc = LIRC::Client.new
mpd = MPD.new 'localhost', 6600
mpd.connect
lirc.each do |event|
case event.name
when "play"
mpc.play
when "pause"
mpd.pause = !mpd.pause
when "stop"
mpd.stop
end
end