X Screen Saver Utilities
Go to file
Neale Pickett 8b06b1ed2c Add xbell, more documentation, xkeygrab now tries forever 2008-04-21 11:14:20 -06:00
COPYING A little cleanup + license 2008-04-10 14:59:57 -06:00
Makefile Add xkeygrab program 2008-04-15 17:18:35 -06:00
README Fix bug in example screenlock script 2008-04-17 13:05:03 -06:00
magic.c Fix some magic color bugs 2008-04-16 22:23:39 -06:00
obj.h A few README modifications 2008-04-14 16:15:03 -06:00
xbell.c Add xbell, more documentation, xkeygrab now tries forever 2008-04-21 11:14:20 -06:00
xcursorpos.c Add xkeygrab program 2008-04-15 17:18:35 -06:00
xkeygrab.c Try three times to grab keyboard. 2008-04-18 11:43:12 -06:00
xss.c Have xss request a 1x1 window at (-1, -1) for X's built-in screensaver window. 2008-04-18 11:56:30 -06:00
xsswin.c Try three times to grab keyboard. 2008-04-18 11:43:12 -06:00

README

== xss ==

`xss` uses the nearly 20-year-old MIT-SCREEN-SAVER extension to launch a
program when the X server turns on the built-in screen saver.

`xsswin` makes a full-screen black window and runs some other program,
passing along the window ID in the environment (`$XSS_WINDOW`) and
possibly as an argument (`XSS_WINDOW` in argv is replaced with the ID).

`xkeygrab` grabs the keyboard and mouse, and echoes all typed lines to
stdout.

`xcursorpos` prints out the x and y coordinates of the cursor.

`magic` is a reimplementation of the "magic" screen saver from After
Dark.  It probably doesn't work with an 8-bit color pallette.


Examples
--------

Tell the X server to launch the screen saver after 90 seconds idle:

    xset s 90


Run like `xautolock`:

    xss xlock -mode qix &


Shell script to run `magic` while waiting for a pass word from the keybord.  Won't
do anything if the cursor is in the upper-left corner:

    #! /bin/sh
    
    xcursorpos | (read x y; [ $x -lt 20 -a $y -lt 20 ]) && exit 0
    xsswin magic XSS_WINDOW &
    pid=$!
    xkeygrab | (while read l; do [ "$l" != "secret" ] && break; done)
    kill $pid


Download
--------

You can download a [tarball of the latest
commit](http://woozle.org/~neale/repos/?p=xss;a=snapshot) or use git:

    git clone http://woozle.org/~neale/repos/xss/


History
-------

AIX apparently had something also called `xss` which did almost exactly
what mine does, but with command-line options.

`magic` is similar to the `qix` hack from xscreensaver and xlock.

I'm not aware of anything else like the rest of the programs, which is
why I wrote them.

I lifted some code from `beforelight` from the X11 distribution, and
from `slock` from [suckless.org](http://suckless.org/).  Both have a
BSD/X11-like license.


------

Neale Pickett <neale@woozle.org>