xss/README

72 lines
1.7 KiB
Plaintext
Raw Normal View History

2008-04-11 16:49:42 -06:00
== xss ==
2008-04-14 16:15:03 -06:00
`xss` uses the nearly 20-year-old MIT-SCREEN-SAVER extension to launch a
2008-04-11 16:49:42 -06:00
program when the X server turns on the built-in screen saver.
2008-04-14 16:15:03 -06:00
`xsswin` makes a full-screen black window and runs some other program,
2008-04-11 16:49:42 -06:00
passing along the window ID in the environment ($XSS_WINDOW) and
2008-04-15 17:18:35 -06:00
possibly as an argument (XSS_WINDOW gets replaced with the id).
`xkeygrab` grabs the keyboard and mouse, and echoes all typed lines to
stdout.
2008-04-11 16:49:42 -06:00
2008-04-14 16:15:03 -06:00
`xcursorpos` prints out the x and y coordinates of the cursor.
2008-04-11 16:49:42 -06:00
`magic` is a reimplementation of the "magic" screen saver from After
Dark.
2008-04-15 17:18:35 -06:00
2008-04-11 16:49:42 -06:00
Examples
--------
Tell the X server to launch the screen saver after 90 seconds idle:
xset s 90
2008-04-14 16:15:03 -06:00
Run like `xautolock`:
2008-04-11 16:49:42 -06:00
xss xlock -mode qix &
2008-04-15 17:18:35 -06:00
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:
2008-04-11 16:49:42 -06:00
#! /bin/sh
2008-04-14 11:01:47 -06:00
xcursorpos | (read x y; [ $x -lt 20 -a $y -lt 20 ]) && exit 0
xsswin magic XSS_WINDOW &
2008-04-11 16:49:42 -06:00
pid=$!
2008-04-15 17:18:35 -06:00
xkeygrab | (while [ "$l" != "secret" ]; do read l; done)
2008-04-11 16:49:42 -06:00
kill $pid
2008-04-15 17:18:35 -06:00
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/
2008-04-11 16:49:42 -06:00
History
-------
AIX apparently had something also called `xss` which did almost exactly
2008-04-14 16:15:03 -06:00
what mine does, but with command-line options.
2008-04-11 16:49:42 -06:00
2008-04-15 17:18:35 -06:00
`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.
2008-04-11 16:49:42 -06:00
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>