stage 4 package updates
[hdw-linux/hdw-linux.git] / packages / x11 / wmmon / debian.patch
1 --- wmmon-1.0b2.orig/wmgeneral/wmgeneral.c
2 +++ wmmon-1.0b2/wmgeneral/wmgeneral.c
3 @@ -12,6 +12,8 @@
4         ---
5         CHANGES:
6         ---
7 +       10/10/2003 (Simon Law, sfllaw@debian.org)
8 +               * changed the parse_rcfile function to use getline instead of fgets.
9         02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
10                 * changed the read_rc_file to parse_rcfile, as suggester by Marcelo E. Magallon
11                 * debugged the parse_rc file.
12 @@ -21,6 +23,7 @@
13  
14  */
15  
16 +#define _GNU_SOURCE
17  #include <stdlib.h>
18  #include <stdio.h>
19  #include <string.h>
20 @@ -83,17 +86,18 @@
21  void parse_rcfile(const char *filename, rckeys *keys) {
22  
23         char    *p;
24 -       char    temp[128];
25 +       char    *line = NULL;
26 +       size_t  line_size = 0;
27         char    *tokens = " :\t\n";
28         FILE    *fp;
29         int             i,key;
30  
31         fp = fopen(filename, "r");
32         if (fp) {
33 -               while (fgets(temp, 128, fp)) {
34 +               while (getline(&line, &line_size, fp) >= 0) {
35                         key = 0;
36                         while (key >= 0 && keys[key].label) {
37 -                               if ((p = strstr(temp, keys[key].label))) {
38 +                               if ((p = strstr(line, keys[key].label))) {
39                                         p += strlen(keys[key].label);
40                                         p += strspn(p, tokens);
41                                         if ((i = strcspn(p, "#\n"))) p[i] = 0;
42 @@ -270,6 +274,7 @@
43         unsigned int    borderwidth = 1;
44         XClassHint              classHint;
45         char                    *display_name = NULL;
46 +       char                    *geometry = NULL;
47         char                    *wname = argv[0];
48         XTextProperty   name;
49  
50 @@ -282,7 +287,9 @@
51  
52         for (i=1; argv[i]; i++) {
53                 if (!strcmp(argv[i], "-display")) 
54 -                       display_name = argv[i+1];
55 +                       display_name = argv[++i];
56 +               else if (!strcmp(argv[i], "-geometry"))
57 +                       geometry = argv[++i];
58         }
59  
60         if (!(display = XOpenDisplay(display_name))) {
61 @@ -307,7 +314,11 @@
62         fore_pix = GetColor("black");
63  
64         XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints,
65 -                               &mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy);
66 +                   &mysizehints.x, &mysizehints.y,
67 +                   &mysizehints.width, &mysizehints.height, &dummy);
68 +       if (geometry)
69 +               XParseGeometry(geometry, &mysizehints.x, &mysizehints.y,
70 +                              &mysizehints.width, &mysizehints.height);
71  
72         mysizehints.width = 64;
73         mysizehints.height = 64;
74 @@ -364,3 +375,6 @@
75         XMapWindow(display, win);
76  
77  }
78 +
79 +/* vim: sw=4 ts=4 columns=82
80 + */
81 --- wmmon-1.0b2.orig/wmmon/wmmon.c
82 +++ wmmon-1.0b2/wmmon/wmmon.c
83 @@ -28,6 +28,12 @@
84         Changes:
85         ----
86  
87 +       15/05/2004 (Simon Law, sfllaw@debian.org)
88 +               * Support disabling of mode-cycling
89 +       23/10/2003 (Simon Law, sfllaw@debian.org)
90 +               * Eliminated exploitable static buffers
91 +               * Added -geometry support.
92 +               * /proc/meminfo support for Linux 2.6
93         18/05/1998 (Antoine Nulle, warp@xs4all.nl)
94                 * MEM/SWAP/UPTIME only updated when visible
95                 * Using global file descriptors to reduce file
96 @@ -65,6 +71,7 @@
97                 * First Working Version
98  */
99  
100 +#define _GNU_SOURCE
101  #include <stdlib.h>
102  #include <stdio.h>
103  #include <time.h>
104 @@ -100,31 +107,28 @@
105   /* Global Variables */
106  /********************/
107  
108 -char   *ProgName;
109  int    stat_current = 0; /* now global */
110 +int mode_cycling = 1; /* Allow mode-cycling */
111  FILE   *fp_meminfo;
112  FILE   *fp_stat;
113  FILE   *fp_loadavg;
114  
115  /* functions */
116 -void usage(void);
117 +void usage(char*);
118  void printversion(void);
119  void DrawStats(int *, int, int, int, int);
120  void DrawStats_io(int *, int, int, int, int);
121  
122  void wmmon_routine(int, char **);
123  
124 -void main(int argc, char *argv[]) {
125 +int main(int argc, char *argv[]) {
126  
127         int             i;
128 +       char    *name = argv[0];
129         
130  
131         /* Parse Command Line */
132  
133 -       ProgName = argv[0];
134 -       if (strlen(ProgName) >= 5)
135 -               ProgName += (strlen(ProgName) - 5);
136 -       
137         for (i=1; i<argc; i++) {
138                 char *arg = argv[i];
139  
140 @@ -132,13 +136,17 @@
141                         switch (arg[1]) {
142                         case 'd' :
143                                 if (strcmp(arg+1, "display")) {
144 -                                       usage();
145 -                                       exit(1);
146 +                                       usage(name);
147 +                                       return 1;
148                                 }
149                                 break;
150 -                       case 'v' :
151 -                               printversion();
152 -                               exit(0);
153 +                       case 'g' :
154 +                               if (strcmp(arg+1, "geometry")) {
155 +                                       usage(name);
156 +                                       return 1;
157 +                               }
158 +                       case 'l' :
159 +                               mode_cycling = 0;
160                                 break;
161                         case 'i' :
162                                 stat_current = 1;
163 @@ -146,15 +154,20 @@
164                         case 's' :
165                                 stat_current = 2;
166                                 break;
167 +                       case 'v' :
168 +                               printversion();
169 +                               return 0;
170                         default:
171 -                               usage();
172 -                               exit(0);
173 -                               break;
174 +                               usage(name);
175 +                               return 1;
176                         }
177                 }
178         }
179  
180         wmmon_routine(argc, argv);
181 +  
182 +      exit (0);
183 +   
184  }
185  
186  /*******************************************************************************\
187 @@ -214,8 +227,7 @@
188         long            idle;
189  
190         FILE            *fp;
191 -       char            temp[128];
192 -       char            *p;
193 +       char            *conffile = NULL;
194  
195         int                     xpm_X = 0, xpm_Y = 0;
196  
197 @@ -246,16 +258,21 @@
198         if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
199         if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
200  
201 -       strcpy(temp, "/etc/wmmonrc");
202 -       parse_rcfile(temp, wmmon_keys);
203 +       /* Scan through the .rc files */
204 +       if (asprintf(&conffile, "/etc/wmmonrc") >= 0) {
205 +               parse_rcfile(conffile, wmmon_keys);
206 +               free(conffile);
207 +       }
208  
209 -       p = getenv("HOME");
210 -       strcpy(temp, p);
211 -       strcat(temp, "/.wmmonrc");
212 -       parse_rcfile(temp, wmmon_keys);
213 -       
214 -       strcpy(temp, "/etc/wmmonrc.fixed");
215 -       parse_rcfile(temp, wmmon_keys);
216 +       if (asprintf(&conffile, "%s/.wmmonrc", getenv("HOME")) >= 0) {
217 +               parse_rcfile(conffile, wmmon_keys);
218 +               free(conffile);
219 +       }
220 +
221 +       if (asprintf(&conffile, "/etc/wmmonrc.fixed") >= 0) {
222 +               parse_rcfile(conffile, wmmon_keys);
223 +               free(conffile);
224 +       }
225  
226         stat_online = checksysdevs();
227  
228 @@ -269,26 +286,36 @@
229         starttime = time(0);
230         nexttime = starttime + 10;
231  
232 +       /* Collect information on each panel */
233         for (i=0; i<stat_online; i++) {
234                 get_statistics(stat_device[i].name, &k, &istat, &idle);
235                 stat_device[i].statlast = istat;
236                 stat_device[i].idlelast = idle;
237         }
238 -       if (stat_current == 0) DrawStats(stat_device[stat_current].his, 54, 40, 5, 58);
239 -       if (stat_current == 1) {
240 -               DrawStats_io(stat_device[stat_current].his, 54, 40, 5, 58);
241 -       }
242 -       if (stat_current == 2) {
243 -               xpm_X = 64;
244 -               setMaskXY(-64, 0);
245 -       } else {
246 -               xpm_X = 0;
247 -               setMaskXY(0, 0);
248 +
249 +       /* Set the mask for the current window */
250 +       switch (stat_current) {
251 +               case 0:
252 +               case 1:
253 +                       xpm_X = 0;
254 +                       setMaskXY(0, 0);
255 +                       break;
256 +               case 2:
257 +                       xpm_X = 64;
258 +                       setMaskXY(-64, 0);
259 +               default:
260 +                       break;
261         }
262 +
263 +       /* Draw statistics */
264 +       if (stat_current == 0)
265 +               DrawStats(stat_device[stat_current].his, 54, 40, 5, 58);
266 +       if (stat_current == 1)
267 +               DrawStats_io(stat_device[stat_current].his, 54, 40, 5, 58);
268         DrawActive(stat_device[stat_current].name);
269  
270         while (1) {
271 -               curtime = time(0);
272 +               curtime = time(NULL);
273  
274                 waitpid(0, NULL, WNOHANG);
275  
276 @@ -377,6 +404,9 @@
277                 if (curtime >= nexttime) {
278                         nexttime+=10;
279  
280 +                       if (curtime > nexttime) /* dont let APM suspends make this crazy */
281 +                         nexttime = curtime;
282 +
283                         for (i=0; i<stat_online; i++) {
284                                 if (stat_device[i].his[54])
285                                         stat_device[i].his[54] /= stat_device[i].hisaddcnt;
286 @@ -411,7 +441,7 @@
287                                 break;
288                         case ButtonRelease:
289                                 i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
290 -                               if (but_stat == i && but_stat >= 0) {
291 +                               if (but_stat == i && but_stat >= 0 && mode_cycling) {
292                                         switch (but_stat) {
293                                         case 0:
294                                                 switch (Event.xbutton.button) {
295 @@ -430,7 +460,6 @@
296                                                 }
297                                         case 1:
298                                                 stat_current++;
299 -                                               printf("current stat is :%d\n", stat_current);
300                                                 if (stat_current == stat_online)
301                                                         stat_current = 0;
302  
303 @@ -499,43 +528,80 @@
304  
305  void update_stat_mem(stat_dev *st, stat_dev *st2) {
306  
307 -       char    temp[128];
308 +       static char *line = NULL;
309 +       static size_t line_size = 0;
310 +
311 +       unsigned long swapfree;
312         unsigned long free, shared, buffers, cached;
313  
314         freopen("/proc/meminfo", "r", fp_meminfo);
315 -       while (fgets(temp, 128, fp_meminfo)) {
316 -               if (strstr(temp, "Mem:")) {
317 -                       sscanf(temp, "Mem: %ld %ld %ld %ld %ld %ld",
318 -                              &st->rt_idle, &st->rt_stat,
319 -                              &free, &shared, &buffers, &cached);
320 -                       st->rt_idle >>= 10;
321 -                       st->rt_stat -= buffers+cached;
322 -                       st->rt_stat >>= 10;
323 -//                     break;
324 -               }
325 -               if (strstr(temp, "Swap:")) {
326 -                       sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat);
327 -                       st2->rt_idle >>= 10;
328 -                       st2->rt_stat >>= 10;
329 -                       break;
330 +       while ((getline(&line, &line_size, fp_meminfo)) > 0) {
331 +               /* The original format for the first two lines of /proc/meminfo was
332 +                * Mem: total used free shared buffers cached
333 +                * Swap: total used free
334 +                *
335 +                * As of at least 2.5.47 these two lines were removed, so that the
336 +                * required information has to come from the rest of the lines.
337 +                * On top of that, used is no longer recorded - you have to work
338 +                * this out yourself, from total - free.
339 +                *
340 +                * So, these changes below should work. They should also work with
341 +                * older kernels, too, since the new format has been available for
342 +                * ages.
343 +                */
344 +               if (strstr(line, "MemTotal:")) {
345 +                       sscanf(line, "MemTotal: %ld", &st->rt_idle);
346 +               }
347 +               else if (strstr(line, "MemFree:")) {
348 +                       sscanf(line, "MemFree: %ld", &free);
349 +               }
350 +               else if (strstr(line, "MemShared:")) {
351 +                       sscanf(line, "MemShared: %ld", &shared);
352 +               }
353 +               else if (strstr(line, "Buffers:")) {
354 +                       sscanf(line, "Buffers: %ld", &buffers);
355 +               }
356 +               else if (strstr(line, "Cached:")) {
357 +                       sscanf(line, "Cached: %ld", &cached);
358 +               }
359 +               else if (strstr(line, "SwapTotal:")) {
360 +                       sscanf(line, "SwapTotal: %ld", &st2->rt_idle);
361 +               }
362 +               else if (strstr(line, "SwapFree:")) {
363 +                       sscanf(line, "SwapFree: %ld", &swapfree);
364                 }
365         }
366 +
367 +       /* memory use - rt_stat is the amount used, it seems, and this isn't
368 +        * recorded in current version of /proc/meminfo (as of 2.5.47), so we
369 +        * calculate it from MemTotal - MemFree
370 +        */
371 +       st->rt_stat = st->rt_idle - free;
372 +       st->rt_stat -= buffers+cached;
373 +       /* As with the amount of memory used, it's not recorded any more, so
374 +        * we have to calculate it ourselves.
375 +        */
376 +       st2->rt_stat = st2->rt_idle - swapfree;
377  }
378  
379  void update_stat_swp(stat_dev *st) {
380  
381 -       char    temp[128];
382 +       static char *line = NULL;
383 +       static size_t line_size = 0;
384 +       unsigned long swapfree;
385  
386         fseek(fp_meminfo, 0, SEEK_SET);
387 -       while (fgets(temp, 128, fp_meminfo)) {
388 -               if (strstr(temp, "Swap:")) {
389 -                       sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat);
390 -                       st->rt_idle >>= 10;
391 -                       st->rt_stat >>= 10;
392 -                       break;
393 +       while ((getline(&line, &line_size, fp_meminfo)) > 0) {
394 +               /* As with update_stat_mem(), the format change to /proc/meminfo has
395 +                * forced some changes here. */
396 +               if (strstr(line, "SwapTotal:")) {
397 +                       sscanf(line, "SwapTotal: %ld", &st->rt_idle);
398 +               }
399 +               else if (strstr(line, "SwapFree:")) {
400 +                       sscanf(line, "SwapFree: %ld", &swapfree);
401                 }
402         }
403 -
404 +       st->rt_stat = st->rt_idle - swapfree;
405  }
406  
407  /*******************************************************************************\
408 @@ -545,11 +611,11 @@
409  void get_statistics(char *devname, long *is, long *ds, long *idle) {
410  
411         int     i;
412 -       char    temp[128];
413 +       static char *line = NULL;
414 +       static size_t line_size = 0;
415         char    *p;
416         char    *tokens = " \t\n";
417         float   f;
418 -       long    maxdiskio=0;
419  
420         *is = 0;
421         *ds = 0;
422 @@ -557,9 +623,9 @@
423  
424         if (!strncmp(devname, "cpu", 3)) {
425                 fseek(fp_stat, 0, SEEK_SET);
426 -               while (fgets(temp, 128, fp_stat)) {
427 -                       if (strstr(temp, "cpu")) {
428 -                               p = strtok(temp, tokens);
429 +               while ((getline(&line, &line_size, fp_stat)) > 0) {
430 +                       if (strstr(line, "cpu ")) {
431 +                               p = strtok(line, tokens);
432                                 /* 1..3, 4 == idle, we don't want idle! */
433                                 for (i=0; i<3; i++) {
434                                         p = strtok(NULL, tokens);
435 @@ -577,17 +643,35 @@
436         if (!strncmp(devname, "i/o", 3)) {
437  
438                 fseek(fp_stat, 0, SEEK_SET);
439 -               while (fgets(temp, 128, fp_stat)) {
440 -                       if (strstr(temp, "disk_rio") || strstr(temp, "disk_wio")) {
441 -                               p = strtok(temp, tokens);
442 +               while ((getline(&line, &line_size, fp_stat)) > 0) {
443 +                       if (strstr(line, "disk_rio") || strstr(line, "disk_wio")) {
444 +                               p = strtok(line, tokens);
445                                 /* 1..4 */
446                                 for (i=0; i<4; i++) {
447                                         p = strtok(NULL, tokens);
448                                         *ds += atol(p);
449                                 }
450                         }
451 +                       else if (strstr(line, "disk_io")) {
452 +                               int val;
453 +                               unsigned int a, b, c, d, e, h, g;
454 +   
455 +                               p = strtok(line, tokens);
456 +   
457 +                               while ((p = strtok(NULL, tokens))) {
458 +                                       val = sscanf (p,
459 +                                                     "(%d,%d):(%d,%d,%d,%d,%d)",
460 +                                                     &a, &b, &c, &d, &e, &h,
461 +                                                     &g);
462 +   
463 +                                       if (val != 7)
464 +                                               continue;
465 +   
466 +                                       *ds += d;
467 +                                       *ds += h;
468 +                               }
469 +                       }
470                 }
471 -               if (*ds > maxdiskio) maxdiskio = *ds;
472         }
473  }
474  
475 @@ -715,16 +799,17 @@
476  |* usage                                                                                                                                          *|
477  \*******************************************************************************/
478  
479 -void usage(void) {
480 -
481 -       fprintf(stderr, "\nwmmon - programming: tijno, (de)bugging & design warp, webhosting: bobby\n\n");
482 -       fprintf(stderr, "usage:\n");
483 -       fprintf(stderr, "\t-display <display name>\n");
484 -       fprintf(stderr, "\t-h\tthis screen\n");
485 -       fprintf(stderr, "\t-v\tprint the version number\n");
486 -       fprintf(stderr, "\t-i\tstartup in DiskIO mode\n");
487 -       fprintf(stderr, "\t-s\tstartup in SysInfo mode\n");
488 -       fprintf(stderr, "\n");
489 +void usage(char *name) {
490 +       printf("Usage: %s [OPTION]...\n", name);
491 +       printf("WindowMaker dockapp that displays system information.\n");
492 +       printf("\n");
493 +       printf("  -display DISPLAY     contact the DISPLAY X server\n");
494 +       printf("  -geometry GEOMETRY   position the clock at GEOMETRY\n");
495 +       printf("  -l                   locked view - cannot cycle modes\n");
496 +       printf("  -i                   start in Disk I/O mode\n");
497 +       printf("  -s                   start in System Info mode\n");
498 +       printf("  -h                   display this help and exit\n");
499 +       printf("  -v                   output version information and exit\n");
500  }
501  
502  /*******************************************************************************\
503 @@ -733,7 +818,7 @@
504  
505  void printversion(void) {
506  
507 -       if (!strcmp(ProgName, "wmmon")) {
508 -               fprintf(stderr, "%s\n", WMMON_VERSION);
509 -       }
510 +       printf("WMMon version %s\n", WMMON_VERSION);
511  }
512 +/* vim: sw=4 ts=4 columns=82
513 + */
514 --- wmmon-1.0b2.orig/wmmon/wmmon.1
515 +++ wmmon-1.0b2/wmmon/wmmon.1
516 @@ -0,0 +1,192 @@
517 +'\" t
518 +.\" Man page for wmmon
519 +.\" Copyright (c) 2003  Software in the Public Interest, Inc.
520 +.\"
521 +.\" This program is free software; you can redistribute it and/or modify
522 +.\" it under the terms of the GNU General Public License as published by
523 +.\" the Free Software Foundation; either version 2 of the License, or (at
524 +.\" your option) any later version.
525 +.\"
526 +.\" This program is distributed in the hope that it will be useful, but
527 +.\" WITHOUT ANY WARRANTY; without even the implied warranty of
528 +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
529 +.\" General Public License for more details.
530 +.\"
531 +.\" You should have received a copy of the GNU General Public License
532 +.\" along with this program; if not, write to the Free Software
533 +.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
534 +.\"
535 +.TH wmmon 1 "May 1998" "WMMON 1.0b2"
536 +
537 +.SH NAME
538 +wmmon \- Window Maker dockapp for monitoring system information
539 +
540 +.SH SYNOPSIS
541 +
542 +.B wmmon
543 +[
544 +.I OPTION
545 +]
546 +
547 +.SH DESCRIPTION
548 +
549 +.B WMMon
550 +monitors the realtime CPU load as well as the average system load,
551 +and gives you some nice additional features too. It is intended for
552 +docking in Window Maker.
553 +
554 +It currently provides:
555 +
556 +.IP \(bu 4
557 +a realtime CPU stress meter;
558 +.IP \(bu
559 +an auto-scaled average system load meter, like
560 +.B xload
561 +and
562 +.BR wmavgload ;
563 +.IP \(bu
564 +a realtime disk I/O stress meter;
565 +.IP \(bu
566 +auto-scaled disk I/O load meter;
567 +.IP \(bu
568 +realtime memory and swap usage meters;
569 +.IP \(bu
570 +a display for system uptime;
571 +.IP \(bu
572 +three user-defined commands to launch.
573 +
574 +.SH OPTIONS
575 +
576 +.TP
577 +.BI \-display \ display
578 +This option specifies the X server to contact; see
579 +.IR X(7x) .
580 +
581 +.TP
582 +.BI \-geometry \ geometry
583 +This option specifies the preferred position of clock; see
584 +.IR X(7x) .
585 +
586 +.TP
587 +.BR \-l
588 +Lock the mode, so that it cannot be cycled by clicking on the upper-left
589 +widget.  You can use this to open multiple copies of
590 +.BR WMMon ,
591 +each set to a different mode.
592 +
593 +.TP
594 +.BR \-i
595 +Start in disk I/O mode, which displays instantaneous disk usage and
596 +average disk load.
597 +
598 +.TP
599 +.BR \-s
600 +Start in system information mode, which displays memory usage, swap usage,
601 +and uptime.
602 +
603 +.TP
604 +.B \-h
605 +Show help information.
606 +
607 +.TP
608 +.B \-v
609 +Print the version number.
610 +
611 +.SH USAGE
612 +The
613 +.B WMMon
614 +display can be cycled between CPU, disk I/O, and system
615 +information displays by clicking on the upper-left widget.  This
616 +displays CPU information by default.
617 +
618 +WMMon can also be used to launch programs.  You may click either left,
619 +middle, or right mouse buttons in the average-load section of the
620 +window.  The pre-configured program will be launched according to the
621 +mouse button clicked.  (see
622 +.B CONFIGURATION FILE
623 +below.)
624 +
625 +In order to move
626 +.BR WMMon ,
627 +drag on the outer edges.  These are not sensitive to mouse clicks.
628 +
629 +.SH "DOCKING IN WINDOW MANAGERS"
630 +
631 +.TP
632 +Window Maker
633 +
634 +Window Maker users should drag and drop the
635 +.B WMMon
636 +window on the Dock.  Then, right-click on the border of the window and
637 +select \*(lqSettings...\*(rq.  Check \*(lqStart when Window Maker
638 +is started\*(rq.
639 +
640 +.TP
641 +AfterStep
642 +
643 +AfterStep users should put the following in their
644 +.I $HOME/.steprc
645 +
646 +.RS 16
647 +Wharf wmmon \- MaxSwallow "wmmon" wmmon &
648 +.RE
649 +
650 +.TP
651 +Other window managers
652 +
653 +.B WMMon
654 +runs nicely as a 64x64 shaped icon on your desktop.
655 +
656 +.SH "CONFIGURATION FILE"
657 +
658 +.B WMMon
659 +can launch three user-defined commands, triggered by left, middle and
660 +right mouse button clicks.  You can define the commands to launch in
661 +.I $HOME/.wmmonrc
662 +
663 +.RS
664 +.PD 0
665 +left: xterm
666 +.PP
667 +middle: xload
668 +.PP
669 +right: xcalc
670 +.PP
671 +.PD 
672 +.RE
673 +
674 +If
675 +.B WMMon
676 +detects a
677 +.I $HOME/.wmmonrc
678 +file, it will launch the appropriate command when you click on the clock.
679 +
680 +The system administrator can define default commands in
681 +.IR /etc/wmmonrc .
682 +The administrator may also choose to \*(lqfix\*(rq particular commands,
683 +making it impossible for users to change.  These commands can be defined in
684 +.IR /etc/wmmonrc.fixed ,
685 +although this isn't a nice thing to do.
686 +
687 +.SH FILES
688 +
689 +.I /etc/wmmonrc
690 +.br
691 +.I $HOME/.wmmonrc
692 +.br
693 +.I /etc/wmmonrc.fixed
694 +
695 +.SH AUTHORS
696 +
697 +.B WMMon
698 +was written by Martijn Pieterse and Antoine Nulle.
699 +
700 +This manual page was written by Simon Law <sfllaw@debian.org> for the
701 +.B Debian
702 +system (but may be used by others). It is based on the documentation provided
703 +by the original program.
704 +
705 +This manual is free software; you can redistribute it and/or modify
706 +it under the terms of the GNU General Public License as published by
707 +the Free Software Foundation; either version 2 of the License, or (at
708 +your option) any later version.