diff -urN fvwm-2.2.4.orig/acconfig.h fvwm-2.2.4/acconfig.h
--- fvwm-2.2.4.orig/acconfig.h	Tue Jan 19 20:04:41 1999
+++ fvwm-2.2.4/acconfig.h	Sun Mar 12 10:55:30 2000
@@ -106,6 +106,9 @@
  * "WindowShade" for more information.  */
 #undef WINDOWSHADE
 
+/* Enables a CDE-style led. */
+#undef LED
+
 /* Specify a type for sig_atomic_t if it's not available.  */
 #undef sig_atomic_t
 
diff -urN fvwm-2.2.4.orig/config.h.in fvwm-2.2.4/config.h.in
--- fvwm-2.2.4.orig/config.h.in	Tue Jan 19 20:04:42 1999
+++ fvwm-2.2.4/config.h.in	Sun Mar 12 10:51:17 2000
@@ -107,6 +107,9 @@
  * "WindowShade" for more information.  */
 #undef WINDOWSHADE
 
+/* Enables a CDE-style led. */
+#undef LED
+
 /* Specify a type for sig_atomic_t if it's not available.  */
 #undef sig_atomic_t
 
diff -urN fvwm-2.2.4.orig/configure.in fvwm-2.2.4/configure.in
--- fvwm-2.2.4.orig/configure.in	Tue Oct 19 08:26:24 1999
+++ fvwm-2.2.4/configure.in	Sun Mar 12 10:48:06 2000
@@ -33,6 +33,7 @@
 smr_SWITCH(borderstyle, BorderStyle command, on, BORDERSTYLE)
 smr_SWITCH(usedecor, UseDecor style option, on, USEDECOR)
 smr_SWITCH(windowshade, WindowShade function, on, WINDOWSHADE)
+smr_SWITCH(led, CDE-style led, on, LED)
 smr_SWITCH(debug-msgs, debugging messages, off, FVWM_DEBUG_MSGS)
 
 dnl FIXME: default value should be derived from computed path to X
diff -urN fvwm-2.2.4.orig/extras/FvwmGoodStuff/FvwmGoodStuff.c fvwm-2.2.4/extras/FvwmGoodStuff/FvwmGoodStuff.c
--- fvwm-2.2.4.orig/extras/FvwmGoodStuff/FvwmGoodStuff.c	Mon Nov 29 03:59:38 1999
+++ fvwm-2.2.4/extras/FvwmGoodStuff/FvwmGoodStuff.c	Sun Mar 12 10:25:26 2000
@@ -12,6 +12,13 @@
 
 #include "config.h"
 
+#ifdef LED  
+#define LED_ON  light_on_pixmap_xpm
+#define LED_OFF light_off_pixmap_xpm
+#include "light_off_pixmap.xpm"
+#include "light_on_pixmap.xpm"
+#endif
+
 #ifdef HAVE_SYS_BSDTYPES_H
 #include <sys/bsdtypes.h> /* Saul */
 #endif
@@ -56,7 +63,7 @@
 char *font_string = "fixed";
 
 Pixel hilite_pix, back_pix, shadow_pix, fore_pix;
-GC  NormalGC,ShadowGC,ReliefGC;
+GC  NormalGC,ShadowGC,ReliefGC,PlainGC;
 Window main_win;
 int Width, Height,win_x,win_y;
 
@@ -74,6 +81,12 @@
 int xneg = 0, yneg = 0;
 int xpad = 2, ypad = 4, framew = 2;
 
+#ifdef LED
+int led_i,led_j,ledState=0,ledCounter=0;
+int led = -2;
+struct timeval in_timer;
+#endif
+
 int CurrentButton = -1;
 int fd[2];
 
@@ -128,10 +141,11 @@
       Buttons[i].title = NULL;
       Buttons[i].action = NULL;
       Buttons[i].icon_file = NULL;
+      Buttons[i].icon_data = NULL; /* allow for built-in icons */
       Buttons[i].icon_w = 0;
       Buttons[i].icon_h = 0;
       Buttons[i].BWidth = 1;
-      Buttons[i].BHeight = 1;
+      Buttons[i].BHeight = 2;  /* allow for 2 sizes of buttons */
       Buttons[i].IconWin = None;
       Buttons[i].icon_maskPixmap = None;	/* pixmap for the icon mask */
       Buttons[i].iconPixmap = None;
@@ -168,9 +182,15 @@
     }
   d_depth = DefaultDepth(dpy, screen);
 
+#ifdef LED
+  SetMessageMask(fd, M_NEW_DESK | M_END_WINDOWLIST|
+		M_MAP|  M_RES_NAME| M_RES_CLASS| M_CONFIG_INFO|
+		M_END_CONFIG_INFO| M_WINDOW_NAME| M_DO_EXEC);
+#else
   SetMessageMask(fd, M_NEW_DESK | M_END_WINDOWLIST|
 		 M_MAP|  M_RES_NAME| M_RES_CLASS| M_CONFIG_INFO|
 		 M_END_CONFIG_INFO| M_WINDOW_NAME);
+#endif
 
   ParseOptions();
   if(num_buttons == 0)
@@ -229,8 +249,16 @@
     for(j=0;j<num_columns; j++)
       {
 	button = i*num_columns + j;
-	ConfigureIconWindow(button,i,j);
-      }
+#ifdef LED
+   /* Record coordinates of LED */
+   if (Buttons[button].icon_data==LED_OFF)
+	 {
+	   led_i = i;
+	   led_j = j;
+	 }
+#endif
+   ConfigureIconWindow(button,i,j);
+       }
   XMapSubwindows(dpy,main_win);
   XMapWindow(dpy,main_win);
 
@@ -263,8 +291,26 @@
 
   while(1)
     {
-      if(My_XNextEvent(dpy,&Event))
-	{
+#ifdef LED
+	 if (ledCounter < 0) ledCounter = 0;
+	 if ((ledCounter==0) && (ledState==1)) 
+	   {
+		 Buttons[led].icon_data = LED_OFF;
+		 ledState = 0;
+		 GetXPMData(led);
+		 SetLedWindow(led,led_i,led_j);
+	   }
+		  if ((ledCounter > 0) && !(ledCounter % 25))
+			{
+		 Buttons[led].icon_data = 
+			   (Buttons[led].icon_data==LED_OFF)?LED_ON:LED_OFF;
+		 ledState = (ledState==0)?1:0;
+			  GetXPMData(led);
+			  SetLedWindow(led,led_i,led_j);
+			}
+#endif /* LED */
+	   if(My_XNextEvent(dpy,&Event))
+		  {
 	  switch(Event.type)
 	    {
 	    case Expose:
@@ -355,8 +401,12 @@
 			  CurrentButton = i*num_columns+j;
 			}
 		    }
-              RedrawWindow(CurrentButton);
-              break;
+#ifdef LED
+	   if (CurrentButton != led) RedrawWindow(CurrentButton);
+#else
+		 RedrawWindow(CurrentButton);
+#endif  	   
+		 break;
 
 	    case KeyRelease:
 	    case ButtonRelease:
@@ -563,20 +613,21 @@
 		    if((val1 == 0)&&(val2 == new_desk))
 		      {
 			RelieveWindow(main_win,j*ButtonWidth, i*ButtonHeight,
-				      BW, BH, ShadowGC,ReliefGC);
+				      BW, BH, PlainGC,PlainGC);
 		      }
 		    else
 		      RelieveWindow(main_win,j*ButtonWidth, i*ButtonHeight,
 				    BW, BH,
-				    (CurrentButton==button)?ShadowGC:ReliefGC,
-				    (CurrentButton==button)?ReliefGC:ShadowGC);
+				    (CurrentButton==button)?PlainGC:ReliefGC,
+				    (CurrentButton==button)?ReliefGC:PlainGC);
+					
 		  }
 		else if(Buttons[button].up == 1)
 		  {
 		    RelieveWindow(main_win,j*ButtonWidth, i*ButtonHeight,
 				  BW, BH,
-				  (CurrentButton == button)?ShadowGC:ReliefGC,
-				  (CurrentButton == button)?ReliefGC:ShadowGC);
+				  (CurrentButton == button)?ShadowGC:PlainGC,
+				  (CurrentButton == button)?ReliefGC:PlainGC);
 		  }
 		else
 		  {
@@ -929,6 +980,11 @@
   gcv.foreground = shadow_pix;
   gcv.background = back_pix;
   ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);
+  
+  gcm = GCForeground|GCBackground;
+  gcv.foreground = back_pix;
+  gcv.background = back_pix;
+  PlainGC = XCreateGC(dpy, Root, gcm, &gcv);   
 
   gcm = GCForeground|GCBackground;
   if(font)
@@ -1281,19 +1337,28 @@
       Buttons[num_buttons++].action = NULL;
     }
   else
-    {
-      len = strlen(tline);
-      tmp = tline + len -1;
-      while(((isspace(*tmp))||(*tmp == '\n'))&&(tmp >=tline))
-	{
-	  tmp--;
-	  len--;
-	}
-      ptr = safemalloc(len+1);
-      strncpy(ptr,tline,len);
-      ptr[len]=0;
-      Buttons[num_buttons++].action = ptr;
-    }
+#ifdef LED  
+	if(strncasecmp(tline,"led",3)==0)	/* LED button */
+	  {  
+		led = num_buttons;
+   Buttons[num_buttons].icon_data = LED_OFF;
+		Buttons[num_buttons++].action = NULL; 
+	  }
+	else
+#endif   
+	  {
+		len = strlen(tline);
+		tmp = tline + len -1;
+		while(((isspace(*tmp))||(*tmp == '\n'))&&(tmp >=tline))
+	 {
+	   tmp--;
+	   len--;
+	 }
+		ptr = safemalloc(len+1);
+		strncpy(ptr,tline,len);
+		ptr[len]=0;
+		Buttons[num_buttons++].action = ptr;
+	  }
   return;
 }
 
@@ -1337,8 +1402,18 @@
   FD_ZERO(&in_fdset);
   FD_SET(x_fd,&in_fdset);
   FD_SET(fd[1],&in_fdset);
+  
+#ifdef LED
+  in_timer.tv_sec = 0;  /* added from FvwmCDE */
+  in_timer.tv_usec = 100000;
+
+  select(fd_width,SELECT_TYPE_ARG234 &in_fdset, NULL, NULL, &in_timer);
 
+  /* decrement the ledCounter by 10 jiffies */
+  ledCounter -= 10;
+#else
   select(fd_width,SELECT_TYPE_ARG234 &in_fdset, 0, 0, NULL);
+#endif  
 
   if(FD_ISSET(x_fd, &in_fdset))
     {
@@ -1423,7 +1498,16 @@
     case M_RES_CLASS:
     case M_WINDOW_NAME:
       CheckForHangon(body);
+#ifdef LED  	
+	  ledCounter -= 1500;
+	  if (ledCounter < 0) ledCounter=0;
+#endif  	 
       break;
+#ifdef LED  	
+	case M_DO_EXEC:
+	  ledCounter += 1500;
+	  break;
+#endif   
     default:
       break;
     }
diff -urN fvwm-2.2.4.orig/extras/FvwmGoodStuff/FvwmGoodStuff.h fvwm-2.2.4/extras/FvwmGoodStuff/FvwmGoodStuff.h
--- fvwm-2.2.4.orig/extras/FvwmGoodStuff/FvwmGoodStuff.h	Sun Feb 14 10:48:55 1999
+++ fvwm-2.2.4/extras/FvwmGoodStuff/FvwmGoodStuff.h	Sun Mar 12 11:01:32 2000
@@ -22,9 +22,11 @@
 extern void   LoadIconFile(int button);
 extern void   CreateIconWindow(int button);
 extern void   ConfigureIconWindow(int button,int row, int column);
+extern void   SetLedWindow(int button, int row, int column);
 extern void   DrawIconWindow(int button);
 extern void   GetBitmapFile(int button);
 extern void   GetXPMFile(int button);
+extern void   GetXPMData(int button);
 void process_message(unsigned long type,unsigned long *body);
 extern void send_clientmessage (Display *disp, Window w, Atom a, Time timestamp);
 void swallow(unsigned long *body);
@@ -47,6 +49,9 @@
   char *action;
   char *title;
   char *icon_file;
+#ifdef LED
+  char **icon_data;
+#endif
   int BWidth;                   /* Width of this button in "buttons" */
   int BHeight;
   int icon_w;
diff -urN fvwm-2.2.4.orig/extras/FvwmGoodStuff/icons.c fvwm-2.2.4/extras/FvwmGoodStuff/icons.c
--- fvwm-2.2.4.orig/extras/FvwmGoodStuff/icons.c	Sun Jan 10 15:59:44 1999
+++ fvwm-2.2.4/extras/FvwmGoodStuff/icons.c	Sun Mar 12 10:35:58 2000
@@ -9,8 +9,10 @@
 /***********************************************************************
  *
  * Derived from fvwm icon code
+ * Slightly modified by Allin Cottrell, Mar 2000, to allow for
+ * the use of included XPM data (instead of just .xpm files)
  *
- ***********************************************************************/
+ * ***********************************************************************/
 
 #include "config.h"
 
@@ -54,6 +56,14 @@
   /* First, check for a monochrome bitmap */
   if(Buttons[button].icon_file != NULL)
     GetBitmapFile(button);
+	
+  /* Next, check for included XPM data -- added by Allin Cottrell */
+  if((Buttons[button].icon_data != NULL)&&
+	 (Buttons[button].icon_w == 0)&&(Buttons[button].icon_h == 0))
+	{ 
+	  GetXPMData(button);
+	  return;
+	}  
 
   /* Next, check for a color pixmap */
   if((Buttons[button].icon_file != NULL)&&
@@ -62,6 +72,40 @@
 #endif
 }
 
+ /***************************************************************************
+*
+* Stripped down version of ConfigureIconWindow, to change the
+* pixmap for the LED
+*
+****************************************************************************/
+void SetLedWindow(int button, int row, int column)
+{
+#ifdef LED
+  Pixmap temp;
+
+  if (Buttons[button].icon_maskPixmap != None)
+	{
+	  XShapeCombineMask(dpy, Buttons[button].IconWin, ShapeBounding, 0, 0,
+		   Buttons[button].icon_maskPixmap, ShapeSet);
+	}
+  if(Buttons[button].icon_depth == -1)
+	{
+	  temp = Buttons[button].iconPixmap;
+	  
+	  Buttons[button].iconPixmap = 
+   XCreatePixmap(dpy,Root, Buttons[button].icon_w,
+			 Buttons[button].icon_h,d_depth);
+	  XCopyPlane(dpy,temp,Buttons[button].iconPixmap,NormalGC,
+		0,0,Buttons[button].icon_w,Buttons[button].icon_h,
+		0,0,1);
+	}
+  XSetWindowBackgroundPixmap(dpy, Buttons[button].IconWin,Buttons[button].iconPixmap);
+	
+  XClearWindow(dpy,Buttons[button].IconWin);
+#endif 
+}
+
+
 /****************************************************************************
  *
  * Creates an Icon Window
@@ -236,6 +280,34 @@
       Buttons[button].icon_depth = d_depth;
     } 
   free(path);
+#endif /* XPM */
+#endif
+}
+
+/****************************************************************************
+ *
+ * Processes color XPM data (added by Allin Cottrell)
+ *
+ ****************************************************************************/
+void GetXPMData(int button)
+{
+#ifndef NO_ICONS
+#ifdef XPM
+  XWindowAttributes root_attr;
+  XpmAttributes xpm_attributes;
+
+  XGetWindowAttributes(dpy,Root,&root_attr);
+  xpm_attributes.colormap = root_attr.colormap;
+  xpm_attributes.valuemask = XpmSize | XpmReturnPixels|XpmColormap;
+  if(XpmCreatePixmapFromData(dpy, Root, Buttons[button].icon_data,
+			&Buttons[button].iconPixmap,
+			&Buttons[button].icon_maskPixmap, 
+			&xpm_attributes) == XpmSuccess) 
+	{ 
+	  Buttons[button].icon_w = xpm_attributes.width;
+	  Buttons[button].icon_h = xpm_attributes.height;
+	  Buttons[button].icon_depth = d_depth;
+	} 
 #endif /* XPM */
 #endif
 }
diff -urN fvwm-2.2.4.orig/extras/FvwmGoodStuff/light_off_pixmap.xpm fvwm-2.2.4/extras/FvwmGoodStuff/light_off_pixmap.xpm
--- fvwm-2.2.4.orig/extras/FvwmGoodStuff/light_off_pixmap.xpm	Wed Dec 31 19:00:00 1969
+++ fvwm-2.2.4/extras/FvwmGoodStuff/light_off_pixmap.xpm	Sun Mar 12 10:37:26 2000
@@ -0,0 +1,17 @@
+/* XPM */
+static char * light_off_pixmap_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"24 6 5 1",
+/* colors */
+" 	c #5d6169",
+".	c #969696",
+"X	c #dfdfe7",
+"o	c #ffff00",
+"O	c #414141",
+/* pixels */
+"                        ",
+" ......................X",
+" .o.o.o.o.o.o.o.o.o.o.OX",
+" .o.o.o.o.o.o.o.o.o.o.OX",
+" .OOOOOOOOOOOOOOOOOOOOOX",
+" XXXXXXXXXXXXXXXXXXXXXXX"};
diff -urN fvwm-2.2.4.orig/extras/FvwmGoodStuff/light_on_pixmap.xpm fvwm-2.2.4/extras/FvwmGoodStuff/light_on_pixmap.xpm
--- fvwm-2.2.4.orig/extras/FvwmGoodStuff/light_on_pixmap.xpm	Wed Dec 31 19:00:00 1969
+++ fvwm-2.2.4/extras/FvwmGoodStuff/light_on_pixmap.xpm	Sun Mar 12 10:37:26 2000
@@ -0,0 +1,17 @@
+/* XPM */
+static char * light_on_pixmap_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"24 6 5 1",
+/* colors */
+" 	c #5d6169",
+".	c #969696",
+"X	c #dfdfe7",
+"o	c #ffff00",
+"O	c #414141",
+/* pixels */
+"                        ",
+" ......................X",
+" .ooooooooooooooooooooOX",
+" .ooooooooooooooooooooOX",
+" .OOOOOOOOOOOOOOOOOOOOOX",
+" XXXXXXXXXXXXXXXXXXXXXXX"};
diff -urN fvwm-2.2.4.orig/fvwm/builtins.c fvwm-2.2.4/fvwm/builtins.c
--- fvwm-2.2.4.orig/fvwm/builtins.c	Wed Sep 29 12:33:33 1999
+++ fvwm-2.2.4/fvwm/builtins.c	Sun Mar 12 10:40:23 2000
@@ -872,6 +872,11 @@
       exit(100);
     }
   }
+#ifdef LED
+  if (strncmp(cmd, "xpmroot", 7)) {
+	 BroadcastPacket(M_DO_EXEC,1,1);
+  }
+#endif
   free(cmd);
   return;
 }
diff -urN fvwm-2.2.4.orig/fvwm/module.h fvwm-2.2.4/fvwm/module.h
--- fvwm-2.2.4.orig/fvwm/module.h	Sun Jan 10 18:51:49 1999
+++ fvwm-2.2.4/fvwm/module.h	Sun Mar 12 10:41:41 2000
@@ -52,7 +52,12 @@
 #define M_DEWINDOWSHADE      (1<<25)
 #define M_LOCKONSEND         (1<<26)
 #define M_SENDCONFIG         (1<<27)
-#define MAX_MESSAGES         28
+#ifdef LED
+#define M_DO_EXEC			 (1<<28)
+#define MAX_MESSAGES		 29
+#else
+#define MAX_MESSAGES		 28
+#endif
 
 /*
  * MAX_MASK is used to initialize the pipeMask array.  In a few places
