LIRC client for Ruby
Go to file
Denis Knauf 8e2368bf95 example: mpd.connect. readline -> gets 2010-04-11 18:54:04 +02:00
examples irw.rb 2009-03-26 12:04:19 -06:00
lib example: mpd.connect. readline -> gets 2010-04-11 18:54:04 +02:00
test a couple test 2006-06-24 17:52:50 -06:00
AUTHORS AUTHORS and VERSION added 2010-04-04 02:10:48 +02:00
LICENSE license/readme 2006-06-24 18:06:19 -06:00
README.md example: mpd.connect. readline -> gets 2010-04-11 18:54:04 +02:00
Rakefile meta-data changed (homepage) 2010-04-11 18:22:37 +02:00
VERSION VERSION 0.0.3 2010-04-11 18:48:38 +02:00

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