rcenter 0.6.2

Ben Lynn

INTRODUCTION

The rcenter program reads events from the Creative RM900 remote control
(bundled with the Creative LiveDrive! IR) and executes scripts. It is highly
configurable, and I use it so I can do the following with the remote control:

    - control XMMS, a music playing program
    - change the desktop background
    - start the screensaver

Since arbitrary scripts may be run, rcenter can be used to make the
remote control do anything.

LICENSE

This project is released under the GNU General Public License. See the
LICENSE file for details.

INSTALLATION

Run make.
Then copy the rcenter binary somewhere in your path,
and copy the config directory to ~/.rcenter.

("make install" will copy the binary to /usr/local/bin and copy the config
directory to $(HOME)/.rcenter.)

Note: you'll need the emu10k1 kernel module compiled with sequencer support.
(This is because the remote control sends MIDI events.)

As of this writing, this means that if you use a stock 2.4.x kernel
you need enable experimental drivers before you can enable sequencer support
for the emu10k1. Alternatively, the latest emu10k1 driver can be found at
    http://sourceforge.net/projects/emu10k1
and their documentation describes how to enable sequencer support.

The IR may need to be enabled (e.g. by running emu-config -i).

USAGE

Note: the behaviour of rcenter has changed since version 0.6. There is
no longer a dedicated "cycle button".

When started, rcenter reads the file ~/.rcenter/rcrc, which determines
its behaviour.

For example, the default rcrc contains:

action_file action
initial_action script xmms

This means that during startup, the line "script xmms" is written
to the file ~/.rcenter/action.

Then when a button is pushed, the action file is read. Its contents determine
the action that is performed. In the example, the button that was pushed
will be sent to the "xmms" script as a command-line argument. For example,
if the stop button it pressed, rcenter will execute the script "xmms stop".

Since the action file is read during every button push, if the contents of
the action file are changed, rcenter will execute different actions. For
example, in the bundled "xmms" script, if "start" is pushed, the action file
is overwritten; the line "script xmms" becomes "directory main", which means
that all further button presses will cause scripts in the "main" directory to
be run. This has superseded the old "cycle button" behaviour.

(See the xmms script for more details: it uses my XMMS Pipe Control
plugin, though it could easily be rewritten to use xmms-shell or
xmmsctrl.)

Numbers are also handled specially. When a digit is pushed, if another
digit button is pushed within one second, it is appended to the first to
make a multi-digit number. Up to four digits are handled in this way by
default, so pressing 1, 2, 3, 4 in quick succession (by default, within one
second of each other) will be equivalent to the single event "1234", while
pressing slowly will result in four separate events.

The "speaker" button acts like a shift key. If it is pushed with another
button, then the string "speaker" is prepended to the button name, so for
example, if "speaker" and "options" are pressed simultaneously, then
the "main/speakeroptions" script is run. Strings of digits when the "speaker"
button is held are not recognized.

COMMAND-LINE OPTIONS

    -d <device>
	use <device> instead of /dev/midi00 or /dev/midi (the defaults)

    -h
	display usage

    -l <limit>
	limit digit string lengths to <limit> (default = 4)

    -u <delay>
	set digit string delay length to <delay> microseconds
	(default = 1 second)

    -V
	display version
