toon_root.c: fix handling of XGetWindowProperty
[xpenguins.git] / xpenguins.1
blob4121733c34fed50641fec814145ec9b90e6d0ed5
1 .TH XPenguins 1 "1 October 2001" "XPenguins 2.2"
2 .SH NAME
3 xpenguins \- cute little penguins that walk along the tops of your windows
4 .SH SYNOPSIS
5 .B xpenguins
6 [-option ...]
7 .SH DESCRIPTION
8 .IR XPenguins
9 is a program for animating cute cartoons/animals in your root window.
10 By default it will be penguins - they drop in from the top of the
11 screen, walk along the tops of your windows, up the side of your
12 windows, levitate, skateboard, and do other similarly exciting
13 things. Be careful when you move windows as the little guys squash
14 easily. If you send the program an interupt signal (such as by
15 hitting Ctrl-C) they will burst.
16 .I XPenguins
17 is now themeable, so it is easy to select something else to animate
18 instead of penguins, or even (with a little artistic talent) define
19 your own; see the
20 .B THEMES
21 section below.
22 .SH OPTIONS
23 In all the following cases a double dash can be replaced by a single
24 dash.
25 .TP 8
26 .B "\-a, \-\-no\-angels"
27 Do not show any cherubim flying up to heaven when a toon gets
28 squashed.
29 .TP 8
30 .B "\-b, \-\-no\-blood"
31 Do not show any gory death sequences.
32 .TP 8
33 .BI "\-c " dir ", \-\-config\-dir " dir
34 Look for config files and themes in this directory. The default is
35 usually
36 .IR /usr/share/xpenguins "."
37 .TP 8
38 .BI "\-d " display ", \-\-display " display
39 Send the toons to the specified X display. In the absence of this
40 option, the display specified by the
41 .B DISPLAY
42 environment variable is used. 
43 .TP 8
44 .B "\-h, \-\-help"
45 Print out a message describing the available options.
46 .TP 8
47 .TP 8
48 .B "\-i, \-\-theme\-info"
49 Print out the auxiliary information about a theme and exit. Use the
50 .B "\-t"
51 option to select the theme to describe.
52 .TP 8
53 .B "\-l, \-\-list\-themes"
54 List the available themes, one on each line, and exit.
55 .TP 8
56 .BI "\-m " delay ", \-\-delay " delay
57 Set the delay between each frame in milliseconds. The default is defined
58 by the theme.
59 .TP 8
60 .BI "\-n " number ", \-\-penguins " number
61 The number of toons to start, up to a maximum of 256. The default
62 is defined by the theme.
63 .TP 8
64 .B "\-p, \-\-ignorepopups"
65 Toons fall through `popup' windows (those with the save-under
66 attribute set), such as tooltips. Note that this also includes the KDE
67 panel.
68 .TP 8
69 .B "\-r, \-\-rectwin"
70 Toons regard all windows as rectangular. This option results in
71 faster calculation of window positions, but if you use one of those
72 fancy new window managers with shaped windows then your toons
73 might sometimes look like they're walking on thin air.
74 .TP 8
75 .B "\-g, \-\-bgcapture"
76 Traditionally XPenguins erases where the penguins have been by
77 clearing back to the background image of the desktop. This causes
78 icons on the desktop to be overwritten and does not work with some
79 recent desktops (such as KDE 4).
80 This option causes XPenguins to capture an image of the desktop and
81 use it to redraw the desktop behind the penguins. Icons will no longer
82 get overwritten. XPenguins will also try to keep the image up to date,
83 so that widgets on the desktop don't get overwritten with an old
84 version too often.
85 .TP 8
86 .B "\-s, \-\-squish"
87 Enable the penguins to be squished using any of the mouse
88 buttons. Note that this disables any existing function of the mouse
89 buttons on the root window.
90 .TP 8
91 .BI "\-t " theme ", \-\-theme " theme
92 Use the named theme. The default is
93 .BR Penguins "."
94 If the theme has spaces in its name then you can use underscores
95 instead, or alternatively just put the name in double quotes. This
96 option can be called multiple times to run several themes
97 simultaneously.
98 .TP 8
99 .B  "\-q, --quiet"
100 Suppress the exit message when an interupt is received.
101 .TP 8
102 .B "\-v, \-\-version"
103 Print out the current version number and quit.
104 .TP 8
105 .B "\-\-all"
106 Load all available themes and run them simultaneously.
107 .TP 8
108 .BI "\-\-id " "window"
109 Send toons to the window with this ID, instead of the root window or
110 whichever window is appropriate for the current desktop environment. Note that
111 the ID of X clients reported by
112 .I xwininfo
113 is rarely that of the foremost visible window that should be used here.
114 .TP 8
115 .BI "\-\-nice " "loadaverage1 loadaverage2"
116 Start killing toons when the 1-min averaged system load exceeds
117 .IR loadaverage1 ";"
118 when it exceeds
119 .I loadaverage2
120 kill them all. The toons will reappear when the load average comes
121 down. The load is checked every 5 seconds by looking in
122 .IR /proc/loadavg ","
123 so this option only works under unices that implement this particular
124 pseudo file (probably just Linux). When there are no toons on the screen,
125 .I XPenguins
126 uses only a miniscule amount of CPU time - it just wakes up every 5
127 seconds to recheck the load.
128 .SH THEMES
129 The system themes are usually kept in
130 .IR /usr/share/xpenguins/themes ", "
131 and these can be augmented or overridden by the user's themes in
132 .IR $HOME/.xpenguins/themes "."
133 Each theme has its own subdirectory which to be valid must contain a
134 file called
135 .IR config "."
136 The name of the theme is taken from the directory name, although
137 because many install scripts choke on directory names containing
138 spaces, all spaces in a theme name are represented in the directory
139 name by underscores. Any directory name containing spaces is
140 inaccessible by
141 .IR xpenguins "."
143 In addition to the
144 .I config
145 file, the theme directory contains the toon images that make up the
146 theme in the form of 
147 .IR "xpm image files" "."
148 Additionally, there should be an
149 .I about
150 file which gives information on the creator of the theme, the license
151 under which it is distributed and various other things. This file is
152 principally for use by
153 .IR "xpenguins_applet" ","
154 an applet for
155 .I GNOME
156 that allows different themes to be selected at the click of a
157 button.
160 .I config
161 file has a reasonably straightforward format. You can either read this
162 rather terse description of it or you can have a look at the config
163 file for the default
164 .B Penguins
165 theme, which is usually installed at
166 .IR /usr/share/xpenguins/themes/Penguins/config ","
167 and is reasonably well commented. We'll first establish some simple
168 terminology. Say you have a Farmyard theme with cows and sheep. The
169 cows and sheep are types of 
170 .BR toon ","
171 while the various things they get up to (walking, mooing and so on)
172 are termed
173 .BR activities "."
174 Each
175 .B activity
176 has its own
177 .IR "xpm image file" ","
178 in which the
179 .B frames
180 of the animation are laid out horizontally. Some activities (notably
181 walking) use different images depending on the
182 .B direction
183 the toon is moving in. In this case the frames for the two directions
184 are laid out one above the other in the image.
186 As in shell scripts, comments are initiated with the
187 .B #
188 character and hide the remainder of the line. The format is entirely
189 free except that there is an arbitrary limit on the length of a line
190 of 512 characters.  Spaces, tabs and newlines all count equally as
191 white space. Data is entered as a sequence of
192 .B "key value"
193 pairs, all separated by white space. Neither the
194 .BR keys " nor the " values
195 are case sensitive, except where the
196 .B value
197 is a filename. The following
198 .B keys
199 are understood:
200 .TP 8
201 .BI "delay " delay
202 Set the recommended delay between frames in milliseconds.
203 .TP 8
204 .BI "toon " toon
205 Begin defining a new toon called 
206 .IR toon "."
207 If only one type of toon is present in the theme then this key may be
208 omitted.
209 .TP 8
210 .BI "number " number
211 Set the default number of toons of the current type to start.
212 .TP 8
213 .BI "define " activity
214 Begin defining an
215 .I activity
216 for the current toon. The currently understood activities are
217 .BR walker ", " faller ", " tumbler ", " climber ", " floater ", "
218 .BR runner ", " explosion ", " squashed ", "
219 .BR zapped ", " splatted ", " angel ", " exit " and "
220 .BR action? ", where " ? " is a number between " 0 " and " 6 "."
221 Once you've seen the program in action you should be able to guess
222 which is which. A valid theme must contain at least
223 .BR walkers " and " fallers "."
224 Additionally, you may define a default activity (with
225 .BR "define default" ");"
226 any properties (such as
227 .BR width " and " speed ")"
228 set here are then adopted by the activities defined from then on, if
229 they do not themselves explicitly define those properties.  After an
230 activity has been declared with
231 .BR define ","
232 the following properties may be assigned:
233 .TP 8
234 .BI pixmap " xpmfile"
235 The file containing the image data for the activity. Note that you may
236 not set a 
237 .BR default " pixmap."
238 .TP 8
239 .BI width " width"
240 The width of each frame of the animation in pixels.
241 .TP 8
242 .BI height " height"
243 The height of each frame of the animation in pixels.
244 .TP 8
245 .BI frames " frames"
246 The number of frames in the animation.
247 .TP 8
248 .BI directions " directions"
249 The number of directions for the activity (can be 1 or 2).
250 .TP 8
251 .BI speed " speed"
252 The initial speed of the toon when engaged in this activity, in pixels
253 per frame.
254 .TP 8
255 .BI acceleration " acceleration"
256 The rate at which the speed increases, in pixels per frame
257 squared. This property is not utilised by all activities.
258 .TP 8
259 .BI terminal_velocity " terminal_velocity"
260 The maximum speed in pixels per frame, again not utilised by all activities.
261 .TP 8
262 .BI loop " loop"
263 Only understood by the
264 .BR actions ";"
265 indicates how many times to repeat the action. If negative, then the
266 probility of stopping the action every time the action is complete is
267 .RI "\-1/" loop "."
269 Some notes regarding the various activities. If you design a new
270 theme, feel free to make the
271 .BR splatted ", " squashed ", " zapped " and " exit
272 animations as gory and bloody as you like, but please keep the
273 .B explosion
274 activity nice and tame; that way those of a nervous disposition can
275 employ the
276 .B \-\-no\-blood
277 option which replaces all these violent deaths with a tasteful
278 explosion that wouldn't offend your grandmother. Xpm images
279 files are a factor of two smaller if you can limit the number of
280 colours in the image such that only one character need be used to
281 represent each colour; this also makes 
282 .I XPenguins
283 start up much more rapidly. Rarely are more than 64 colours required.
285 So that's about it for the
286 .I config
287 file, now for the 
288 .I about
289 file. This is very simple. Again comments are initialised by a
290 .BR "#" "."
291 An entry consists of a
292 .BR key
293 at the start of a line, followed by the corresponding
294 .BR value
295 which is read up to the next newline. The following
296 .B keys
297 are understood, although none are compulsory.
298 .TP 8
299 .B artist
300 Used to list the artist(s) who created the original images.
301 .TP 8
302 .B maintainer
303 The person who compiled the images into an
304 .I XPenguins
305 theme. It is useful if an email address can also be provided.
306 .TP 8
307 .B date
308 The date when the theme was last modified. My preferred format is
309 .IR "day of the month" ","
310 .IR "name of the month in english" ","
311 .IR "full year" "."
312 For example: 24 April 2001.
313 .TP 8
314 .B icon
315 The name of an image file that can be used as an icon for the theme;
316 XPM and PNG are suitable formats.
317 .TP 8
318 .B license
319 The name of the license under which the theme is distributed
320 (e.g. GPL).
321 .TP 8
322 .B copyright
323 The year and holder of the copyright.
324 .TP 8
325 .B comment
326 Any other essential information, such as the theme's web site, as
327 brief as possible.
329 Please test any 
330 .I about
331 files you create by looking at how the information is displayed by the
332 .I xpenguins_applet
333 program.
335 .SH AUTHOR
336 Robin Hogan <R.J.Hogan@reading.ac.uk>.
337 .SH CREDITS
338 Inspiration provided by Rick Jansen <rick@sara.nl> in the form of the
339 classic 
340 .IR xsnow . 
341 Most penguin images were taken from 
342 .IR Pingus ","
343 a free lemmings clone that can be found at <http://pingus.seul.org/>;
344 these images were designed by Joel Fauche <joel.fauche@wanadoo.fr> and
345 Craig Timpany <timpany@es.co.nz>. Additional images in version 2 by
346 Rob Gietema <tycoon@planetdescent.com> and Robin Hogan.
347 .SH NOTES
348 .IR XPenguins
349 can load an X server and/or network (although the CPU time used is
350 small), and if a large number of penguins are spawned then they may
351 begin to flicker, depending on the speed of the X server. 
354 .IR xpenguins
355 homepage is located at:
357 http://xpenguins.seul.org/
358 .SH BUGS
359 A new feature since version 2.1 is the ability to draw to windows
360 other than the root window in situations where the window manager or
361 desktop environment places a large window over the root window that
362 would otherwise obscure the toons. Currently
363 .IR XPenguins
364 can draw to the KDE Desktop (KDE 2.0, 2.1, 3 and 4), Enlightenment
365 desktops greater than 0 (E16), the Nautilus desktop and the virtual root
366 window of certain window managers like amiwm.  Of course, simpler window
367 managers that don't mess around like this will still work (sawfish,
368 blackbox and countless others). It cannot work with CDE and probably
369 never will. Future versions of Enlightenment and Nautilus may not work;
370 the classic symptom of this is that
371 .I XPenguins
372 sits there as if it's doing something, but no toons are visible. If
373 this happens, try running the program with one of the simpler window
374 manager listed above, or visit the
375 .I XPenguins
376 web site and download the latest version. If there are icons drawn on
377 the root window then the toons will erase them when they walk over
378 them, although an expose event will be sent to the window every 100
379 frames to redraw them.
380 .SH FILES
381 $HOME/.xpenguins/themes/*
383 /usr/share/xpenguins/themes/*
385 /proc/loadavg
387 .SH "SEE ALSO"
388 xsnow(1), xroach(1), xwininfo(1) pingus(6)