- Version %s, copyright (c) 1991-1994 Jamie Zawinski <jwz@lucid.com>.\n\
-\n\
- -demo Enter interactive demo mode.\n\
- -deactivate Turns off the screensaver if it is on, as user input would.\n\
- -activate Turns it on as if the user had been idle for long enough.\n\
- -cycle Stops the current hack and runs a new one.\n\
- -next Like either -activate or -cycle, depending on which is more\n\
- appropriate, except that the screenhack that will be run is\n\
- the next one in the list of hacks, instead of a randomly-\n\
- chosen one. This option is good for looking at a demo of\n\
- each of the hacks in place.\n\
- -prev Like -next, but goes in the other direction.\n\
- -exit Causes the screensaver process to exit. It should be ok to\n\
- just kill the process (NOT with -9!) but this is a slightly\n\
- easier way.\n\
- -restart Causes the screensaver process to exit and then restart with\n\
- the same command line arguments. This is a good way of \n\
- causing the screensaver to re-read the resource database.\n\
- -lock Same as -activate, but with immediate locking.\n\
-\n\
- See the man page for more details.\n\n";
-
-static Window
-find_screensaver_window (dpy, progname)
- Display *dpy;
- char *progname;
-{
- int i;
- Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
- Window root2, parent, *kids;
- unsigned int nkids;
-
- if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids))
- abort ();
- if (root != root2)
- abort ();
- if (parent)
- abort ();
- if (! (kids && nkids))
- abort ();
- for (i = 0; i < nkids; i++)
- {
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- char *version;
-
- if (XGetWindowProperty (dpy, kids[i],
- XInternAtom (dpy, "_SCREENSAVER_VERSION", False),
- 0, 1, False, XA_STRING,
- &type, &format, &nitems, &bytesafter,
- (unsigned char **) &version)
- == Success
- && type != None)
- return kids[i];
- }
- fprintf (stderr, "%s: no screensaver is running on display %s", progname,
- DisplayString (dpy));
- exit (1);
-}
+ Version %s, copyright (c) 1991-2001 Jamie Zawinski <jwz@jwz.org>.\n\
+\n\
+ The xscreensaver program is a daemon that runs in the background.\n\
+ You control a running xscreensaver process by sending it messages\n\
+ with this program, xscreensaver-command. See the man pages for\n\
+ details. These are the arguments understood by xscreensaver-command:\n\
+\n\
+ -demo Ask the xscreensaver process to enter interactive demo mode.\n\
+\n\
+ -prefs Ask the xscreensaver process to bring up the preferences\n\
+ panel.\n\
+\n\
+ -activate Turn on the screensaver (blank the screen), as if the user\n\
+ had been idle for long enough.\n\
+\n\
+ -deactivate Turns off the screensaver (un-blank the screen), as if user\n\
+ activity had been detected.\n\
+\n\
+ -cycle If the screensaver is active (the screen is blanked), then\n\
+ stop the current graphics demo and run a new one (chosen\n\
+ randomly.)\n\
+\n\
+ -next Like either -activate or -cycle, depending on which is more\n\
+ appropriate, except that the graphics hack that will be run\n\
+ is the next one in the list, instead of a randomly-chosen\n\
+ one. In other words, repeatedly executing -next will cause\n\
+ the xscreensaver process to invoke each graphics demo\n\
+ sequentially. (Though using the -demo option is probably\n\
+ an easier way to accomplish that.)\n\
+\n\
+ -prev Like -next, but goes in the other direction.\n\
+\n\
+ -select <N> Like -activate, but runs the Nth element in the list of\n\
+ hacks. By knowing what is in the `programs' list, and in\n\
+ what order, you can use this to activate the screensaver\n\
+ with a particular graphics demo. (The first element in the\n\
+ list is numbered 1, not 0.)\n\
+\n\
+ -exit Causes the xscreensaver process to exit gracefully. This is\n\
+ roughly the same as killing the process with `kill', but it\n\
+ is easier, since you don't need to first figure out the pid.\n\
+ (Note that one must *never* kill xscreensaver with -9!)\n\
+\n\
+ -restart Causes the screensaver process to exit and then restart with\n\
+ the same command line arguments as last time. Do this after\n\
+ you've changed your X resource settings, to cause\n\
+ xscreensaver to notice the changes.\n\
+\n\
+ -lock Tells the running xscreensaver process to lock the screen\n\
+ immediately. This is like -activate, but forces locking as\n\
+ well, even if locking is not the default. If the saver is\n\
+ already active, this causes it to be locked as well.\n\
+\n\
+ -throttle Temporarily switch to ``blank screen'' mode, and don't run\n\
+ any display modes at all, until the screensaver is next\n\
+ de-activated. This is useful if you're using a machine\n\
+ remotely, and you find that some display modes are using too\n\
+ much CPU.\n\
+\n\
+ -unthrottle Turn `-throttle' off and resume normal behavior.\n\
+\n\
+ -version Prints the version of xscreensaver that is currently running\n\
+ on the display -- that is, the actual version number of the\n\
+ running xscreensaver background process, rather than the\n\
+ version number of xscreensaver-command.\n\
+\n\
+ -time Prints the time at which the screensaver last activated or\n\
+ deactivated (roughly, how long the user has been idle or\n\
+ non-idle -- but not quite, since it only tells you when the\n\
+ screen became blanked or un-blanked.)\n\
+\n\
+ -watch Prints a line each time the screensaver changes state: when\n\
+ the screen blanks, locks, unblanks, or when the running hack\n\
+ is changed. This option never returns; it is intended for\n\
+ by shell scripts that want to react to the screensaver in\n\
+ some way.\n\
+\n\
+ See the man page for more details.\n\
+ For updates, check http://www.jwz.org/xscreensaver/\n\
+\n";