leds README
---
Version 0.2

leds -- makes *amazing* patterns with the keyboard LEDs!
	Hours of fun for the whole family!

		Copyright  2003 Johannes H. Jensen
		<joh@deworks.net>


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Requirements:
setleds: this is included in most distros. Often under the name "coreutils".
xsetleds: if you are going to use leds in X you need this. Get it at
	  ftp://ftp.unix-ag.org/user/bmeurer/xsetleds/
and ofcourse a keyboard with LEDs!

Installation: 
Just copy the leds executable to the place you keep your binaries, 
for example ~/bin:

# cp leds ~/bin

Running leds:

Usage: leds [-s <seconds>] [-p <id>] [-n <number>] [-v] [-X] [-a <on|off>]

Options:

-h, --help      Display this help message and exit.
-l, --list      List all patterns with their IDs.
-p <id>         ID of pattern to use. (Defaults to 0)
-s <seconds>    Number of seconds between each step
                in the pattern. (Defaults to 0.2)
-n <number>     Number of time the pattern repeats.
                -1 is infinite. (Defaults to -1)
-v              Verbose output (output what leds are
                turned on/off at all times.)
-X              Use xsetleds instead of setleds.
                Usefull under X.
-a <on|off>     Set all the leds on or off.
--version       Display version invormation and exit.


Pattern explanation:

The patterns (in the variable $patterns) are looped
intil the num times (see -n) and is in the following
format:

{+|-}led[ {+|-}led[ ...]]; {+|-}led[ {+|-}led[ ...]]; ...

Where each block seperated by the semicolon (;) is
executed at the same time. After that block, we sleep
for $secs seconds before executing the next block.

The led in the pattern can be any led setleds can set
on or off. This is typically one of the following:
{+|-}num	Sets on or off NumLock.
{+|-}caps	Sets on or off CapsLock.
{+|-}scroll	Sets on or off ScrollLock.

Some example patterns:
"+num; -num;"
"+num; +caps; +scroll; -num; -caps; -scroll"
"-num +caps; -caps +scroll; -scroll -caps"
"-num; +num; +num; +num"
	^You can use an already set led to
	 wait longer until next step.


Now you can make all sorts of crazy patterns!
Invite your friends over and show them your little
light-show!

Thanks to:
Eli Spizzichino <esac@javanet.info> for ideas and support.

Have fun!
- Johannes H. Jensen
