xss/README

72 lines
1.7 KiB
Plaintext

== 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 gets 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.
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 [ "$l" != "secret" ]; do read l; 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>