LIRC client for Ruby
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.
Denis Knauf 8e2368bf95 example: mpd.connect. readline -> gets 13 years ago
examples irw.rb 14 years ago
lib example: mpd.connect. readline -> gets 13 years ago
test a couple test 17 years ago
AUTHORS AUTHORS and VERSION added 13 years ago
LICENSE license/readme 17 years ago
README.md example: mpd.connect. readline -> gets 13 years ago
Rakefile meta-data changed (homepage) 13 years ago
VERSION VERSION 0.0.3 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