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-14 16:15:03 -06:00
|
|
|
possibly as an argument (XSS_WINDOW gets replaced with the id). It does
|
|
|
|
not grab keyboard or mouse focus: you'll have to run something else
|
|
|
|
(like `xtrlock`) to do this or other windows will continue to get
|
|
|
|
keyboard and mouse events.
|
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
|
|
|
|
2008-04-14 22:57:19 -06:00
|
|
|
`magic` is a reimplementation of the "magic" screen saver from After
|
|
|
|
Dark.
|
|
|
|
|
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-14 22:57:19 -06:00
|
|
|
Shell script to run `magic` and `xtrlock` at the same time, but prevent
|
|
|
|
locking 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
|
2008-04-14 22:57:19 -06:00
|
|
|
xsswin magic XSS_WINDOW &
|
2008-04-11 16:49:42 -06:00
|
|
|
pid=$!
|
|
|
|
xtrlock
|
|
|
|
kill $pid
|
|
|
|
|
|
|
|
|
|
|
|
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-14 16:15:03 -06:00
|
|
|
I'm not aware of anything else like `xsswin` or `xcursorpos`. If there
|
|
|
|
is already something out there to do these jobs please let me know so I
|
|
|
|
can quit using my versions.
|
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>
|