[comp.sources.x] v03i018: Ardent Window Manager, Patchlevel 9, Part02/12

mikew@wyse.wyse.com (Mike Wexler) (02/18/89)

Submitted-by: kmw@ardent (Ken Wallich)
Posting-number: Volume 3, Issue 18
Archive-name: awm2/part02

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 2 (of 12)."
# Contents:  NewIconify.c awm.man
# Wrapped by mikew@wyse on Fri Feb 17 10:50:20 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'NewIconify.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'NewIconify.c'\"
else
echo shar: Extracting \"'NewIconify.c'\" \(11004 characters\)
sed "s/^X//" >'NewIconify.c' <<'END_OF_FILE'
X
X
X
X#ifndef lint
Xstatic char *rcsid_NewIconify_c = "$Header: /usr/graph2/X11.3/contrib/windowmgrs/awm/RCS/NewIconify.c,v 1.2 89/02/07 21:23:10 jkh Exp $";
X#endif  lint
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.
X *
X *
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X
X/*
X * MODIFICATION HISTORY
X *
X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
X *  Western Software Lab. Port to X11.
X */
X
X#include "awm.h"
X
X/*ARGSUSED*/
XBoolean NewIconify(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                             /* Button event detail. */
Xint x, y;                               /* Event mouse position. */
X{
X     XWindowAttributes fromInfo;	/* from window info. */
X     XWindowAttributes toInfo;		/* to window info. */
X     Window from, to;
X     int mse_x, mse_y;			/* Mouse X and Y coordinates. */
X     int new_x, new_y;			/* To U. L. X and Y coordinates. */
X     int new_w, new_h;			/* To width and height. */
X     int bdw;				/* border width */
X     int prev_x;			/* Previous event window X location. */
X     int prev_y;			/* Previous event window Y location. */
X     int cur_x;				/* Current event window X location. */
X     int cur_y;				/* Current event window Y location. */
X     int root_x;			/* Root window X location. */
X     int root_y;			/* Root window Y location. */
X     int ulx, uly;			/* Event window upper left X and Y. */
X     int lrx, lry;			/* Event window lower right X and Y. */
X     int num_vectors;			/* Number of vectors in box. */
X     int status;				/* Routine call return status. */
X     int ptrmask;			/* pointer query state. */
X     Window root;			/* Mouse root window. */
X     Window sub_win;			/* Mouse position sub-window. */
X     XEvent button_event;		/* Button event packet. */
X     XSegment box[MAX_BOX_VECTORS];	/* Box vertex buffer. */
X     XSegment zap[MAX_ZAP_VECTORS];	/* Zap effect vertex buffer. */
X     int (*storegrid_func)();		/* Function to use for grid */
X     int (*storebox_func)();		/* Function to use for box */
X     AwmInfoPtr awi;
X     extern Window MakeIcon();
X     extern void ungrab_pointer();
X     extern void grab_pointer();
X     
X     Entry("NewIconify")
X	  
X     /*
X      * Do not lower or iconify the root window.
X      */
X     if (window == RootWindow(dpy, scr))
X	  Leave(FALSE)
X     
X     /*
X      * Change the cursor to the icon cursor.
X      */
X     grab_pointer();
X     
X     /*
X      * Clear the vector buffers.
X      */
X     bzero(box, sizeof(box));
X     if (Zap)
X	  bzero(zap, sizeof(zap));
X     
X     /*
X      * Get info on the event window.
X      */
X     awi = GetAwmInfo(window);
X     if (!awi)
X	  Leave(FALSE)
X     /*
X      * Are we iconifying or de-iconifying?
X      */
X     if (awi->state & ST_ICON) {
X          from = awi->icon;
X          to = (awi->frame) ? awi->frame : awi->client;
X     }
X     else if (awi->state & ST_WINDOW) {
X          from = (awi->frame) ? awi->frame : awi->client;
X          to = (awi->icon) ? awi->icon : MakeIcon(window, x, y, FALSE);
X     }
X     else {
X          fprintf(stderr, "NewIconify: Window %x has unknown state '%x'\n",
X		 awi->client, awi->state);
X	  Leave(FALSE)
X     }
X     status = XGetWindowAttributes(dpy, from, &fromInfo);
X     if (status == FAILURE)
X          Leave(FALSE)
X
X     status = XGetWindowAttributes(dpy, to, &toInfo);
X     if (status == FAILURE)
X          Leave(FALSE)
X
X     /*
X      * Initialize the movement variables.
X      */
X     ulx = x - (toInfo.width >> 1) - toInfo.border_width;
X     uly = y - (toInfo.height >> 1) - toInfo.border_width;
X     lrx = x + (toInfo.width >> 1) + toInfo.border_width - 1;
X     lry = y + (toInfo.height >> 1) + toInfo.border_width - 1;
X     prev_x = x;
X     prev_y = y;
X
X     if (awi->frame && awi->state & ST_ICON) {
X	  storegrid_func = StoreTitleGridBox;
X	  storebox_func = StoreTitleBox;
X     }
X     else {
X	  storegrid_func = StoreGridBox;
X	  storebox_func = StoreBox;
X     }
X     
X     /*
X      * Store the box.
X      */
X     if (Grid)
X	  num_vectors = storegrid_func(box, ulx, uly, lrx, lry);
X     else
X	  num_vectors = storebox_func(box, ulx, uly, lrx, lry);
X     
X     /*
X      * Freeze the server, if requested by the user.
X      * This results in a solid box instead of a flickering one.
X      */
X     if (Freeze)
X	  XGrabServer(dpy);
X     
X     /*
X      * Process any outstanding events before drawing the box.
X      */
X     while (QLength(dpy) > 0) {
X	  XPeekEvent(dpy, &button_event);
X	  if (((XAnyEvent *)&button_event)->window == RootWindow(dpy, scr))
X	       break;
X	  GetButton(&button_event);
X     }
X     
X     /*
X      * Draw the box.
X      */
X     DrawBox();
X     if (Freeze)
X	  Frozen = window;
X     
X     /*
X      * We spin our wheels here looking for mouse movement or a change
X      * in the status of the buttons.
X      */
X     Snatched = TRUE;
X     while (TRUE) {
X	  
X	  /*
X	   * Check to see if we have a change in mouse button status.
X	   * This is how we get out of this "while" loop.
X	   */
X	  if (XPending(dpy) && !ProcessRequests(box, num_vectors) &&
X	      GetButton(&button_event)) {
X	       /*
X		* Process the pending events, this sequence is the only
X		* way out of the loop and the routine.
X		*/
X	       
X	       if ((button_event.type != ButtonPress) && 
X		   (button_event.type != ButtonRelease)) {
X		    continue; /* spurious menu event... */
X	       }
X	       
X	       /*
X		* If we froze the server, then erase the last lines drawn.
X		*/
X	       if (Freeze) {
X		    DrawBox();
X		    Frozen = (Window)0;
X		    XUngrabServer(dpy);
X	       }
X	       
X	       /*
X		* Save the mouse cursor location.
X		*/
X	       if (button_event.type == ButtonPress ||
X		   button_event.type == ButtonRelease) {
X		    mse_x = ((XButtonEvent *)&button_event)->x;
X		    mse_y = ((XButtonEvent *)&button_event)->y;
X		    break;
X	       }
X	  }
X	  else {
X	       /*
X		* Continue to track the mouse until we get a change
X		* in button status.
X		*/
X	       XQueryPointer(dpy, RootWindow(dpy, scr), 
X			     &root, &sub_win, &root_x, &root_y, &cur_x,
X			     &cur_y, &ptrmask);
X	       
X	       /*
X		* If the mouse has moved, then make sure the box follows it.
X		*/
X	       if ((cur_x != prev_x) || (cur_y != prev_y)) {
X		    
X		    /*
X		     * If we've frozen the server, then erase the old box first!
X		     */
X		    if (Freeze)
X			 DrawBox();
X		    
X		    /*
X		     * Set the new box position.
X		     */
X		    ulx += cur_x - prev_x;
X		    uly += cur_y - prev_y;
X		    lrx += cur_x - prev_x;
X		    lry += cur_y - prev_y;
X		    
X		    /*
X		     * Calculate the vectors for the new box.
X		     */
X		    
X		    if (Grid)
X			 num_vectors = storegrid_func(box, ulx, uly, lrx,
X							 lry);
X		    else
X			 num_vectors = storebox_func(box, ulx, uly, lrx, lry);
X		    
X		    /*
X		     * Draw the new box.
X		     */
X		    if (Freeze)
X			 DrawBox();
X	       }
X	       
X	       /*
X		* Save the old box position.
X		*/
X	       prev_x = cur_x;
X	       prev_y = cur_y;
X	       
X	       /*
X		* If server is not frozen, then draw the "flicker" box.
X		*/
X	       if (!Freeze) {
X		    DrawBox();
X		    DrawBox();
X	       }
X	  }
X     }
X     Snatched = FALSE;
X     /*
X      * If the button is not a button release of the same button pressed,
X      * then abort the operation.
X      */
X     if ((button_event.type != ButtonRelease) ||
X	 (((XButtonReleasedEvent *)&button_event)->button != button)) {
X	  ResetCursor(button);
X	  ungrab_pointer();
X	  Leave(TRUE)
X     }
X     
X     /*
X      * If we are here we have committed to iconifying/deiconifying.
X      */
X     
X     /*
X      * Determine the coordinates of the icon or window;
X      * normalize the window or icon coordinates if the user so desires.
X      */
X     new_w = toInfo.width;
X     new_h = toInfo.height;
X     bdw = toInfo.border_width;
X     new_x = mse_x - (new_w >> 1) - bdw;
X     new_y = mse_y - (new_h >> 1) - bdw;
X     if ((NIcon && awi->state & ST_WINDOW) || (NWindow && awi->state & ST_ICON)) {
X	  if (new_x < 0) new_x = 0;
X	  if (new_y < 0) new_y = 0;
X	  if ((new_x - 1 + new_w + (bdw << 1)) > ScreenWidth) {
X	       new_x = ScreenWidth - new_w - (bdw << 1) + 1;
X	  }
X	  if ((new_y - 1 + new_h + (bdw << 1)) > ScreenHeight) {
X	       new_y = ScreenHeight - new_h - (bdw << 1) + 1;
X	  }
X     }
X     if (awi->state & ST_ICON) {
X	  awi->state ^= ST_ICON;
X	  awi->state |= (ST_WINDOW | ST_PLACED);
X	  if (!awi->frame)
X	       XRemoveFromSaveSet(dpy, awi->client);
X     }
X     else if (awi->state & ST_WINDOW) {
X	  awi->state ^= ST_WINDOW;
X	  awi->state |= ST_ICON;
X	  XAddToSaveSet(dpy, awi->client);
X     }
X     else
X	  fprintf(stderr, "NewIconify: Window state got trashed!\n");
X     
X     /*
X      * Move the window into place.
X      */
X     XMoveWindow(dpy, to, new_x, new_y);
X 
X     /*
X      * Map the icon window.
X      */
X     XMapRaised(dpy, to);
X     if (Zap) {
X	  num_vectors = StoreZap(zap,
X				 fromInfo.x,
X				 fromInfo.y,
X				 fromInfo.x + fromInfo.width
X				 + (fromInfo.border_width << 1),
X				 fromInfo.y + fromInfo.height
X				 + (fromInfo.border_width << 1),
X				 ulx, uly, lrx, lry);
X	  DrawZap();
X	  DrawZap();
X     }
X     /*
X      * Unmap the event window.
X      */
X     XUnmapWindow(dpy, from);
X     XFlush(dpy);
X     ungrab_pointer();
X     Leave(TRUE)
X}
END_OF_FILE
if test 11004 -ne `wc -c <'NewIconify.c'`; then
    echo shar: \"'NewIconify.c'\" unpacked with wrong size!
fi
# end of 'NewIconify.c'
fi
if test -f 'awm.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm.man'\"
else
echo shar: Extracting \"'awm.man'\" \(41691 characters\)
sed "s/^X//" >'awm.man' <<'END_OF_FILE'
X.de EX          \" Begin example
X.ne 5
X.if n .sp 1
X.if t .sp .5
X.nf
X.in +.5i
X..
X.de EE		\" End example
X.fi
X.in -.5i
X.if n .sp 1
X.if t .sp .5
X..
X.TH AWM 1 "23 July 1988" "X Version 11"
X.SH NAME
X.PP
Xawm - Window Manager X Client Application
X.PP
X.SH SYNOPSIS
X.PP
X.B awm
X[
X.B \-f
Xfilename
X] [
X.B \-e
Xexecfile
X] [
X.B \-b
X] [
X.B \-i
X]
X.PP
X.SH DESCRIPTION
X.PP
XThe \fIawm\fP command is a window manager client 
Xapplication of the window 
Xserver. It is heavily based on an earlier work by M. Gancarz
Xof Digital Equipment Corporation (see the end of this document for
Xappropriate acknowledgments).
X.PP
XWhen \fIawm\fP is invoked, it traces a predefined search path
Xto locate any \fIawm\fP startup files.  If no startup files
Xexist, \fIawm\fP initializes itself from a built-in default file.
X.PP
XIf startup files exist in any of the following locations,
Xtheir contents are merged together to create \fIawm\fP's configuration.
XIn the case of contention, the bindings in the last file found
Xoverride previous specifications.  Files in the \fIawm\fP
Xsearch path are:
X.EX
X$LIBDIR\fI/awm/system.awmrc\fP (where $LIBDIR is defined in awm's Makefile)
X$HOME\fI/.awmrc\fP
X.EE
X.PP
XTo use only the settings defined in a single startup file,
Xinclude the variables, \fBresetbindings\fP, \fBresetmenus\fP and
X\fBresetgadgets\fP at the top of that specific startup file.
X.PP
X.SH OPTIONS
X.IP "\fB\-f\fP filename"
XNames an alternate file as an \fIawm\fP startup file.
X.IP "\fB\-e\fP execfile"
XNames a file to exec (typically a shell script invoking other clients) after
Xall startup files have been loaded. This is useful for minimizing the number of
Xmap/unmaps that occur when titlebars are added.
X.IP "\fB\-b\fP"
XCauses \fIawm\fP to ignore the system startup file.
X.IP "\fB\-i\fP"
XCauses \fIawm\fP to ignore $HOME/\fI.awmrc\fP.
X.PP
X.SH STARTUP FILE VARIABLES
X.PP
XVariables are typically entered first, at the top of the startup
Xfile. Because of a merge with the resource manager, very few variables
Xare set here now. The directives \fBresetbindings\fP, \fBresetmenus\fP
Xand \fBresetgadgets\fP are still allowed, as are gadget declarations of
Xthe form:
X.EX
X\fBgadget[\fP\fIn\fB]\fP=\fIexpr\fP
X.EE
X.PP
XWhere \fIn\fP is a positive integer indicating the gadget to initialize and
X\fIexpr\fP is one of the following:
X.IP "\fIstring\fP or ""\fIstring\fP"" [ ^ \fIattributes\fP ]"
XSet the name of the gadget to \fIstring\fP. The name will be
Xpainted in the gadget box with the \fBgadget.font\fP resource
Xor an overriding font attribute (see below).
X\fIstring\fP may contain embedded non-alphanumeric characters
Xin the form of \\\fI#\fP where \fI#\fP is one or more decimal digits (i.e. \\54)
Xor \\\fIc\fP where \fIc\fP is a character in the standard C string
Xliteral set (i.e. n, r, t, f). This is useful if you've specified
Xa gadget font with glyphs in it (such as cursor) and you want to paint
Xa specific glyph from it in a gadget box. Many such glyphs are not
Xrepresented by ascii characters.
X.IP "(\fIstring\fP) [ ^ \fIattributes\fP ]"
XLoad a pixmap from the file named by \fIstring\fP and
Xtile the gadget with it (see also: \fBpath\fP).
X.PP
XAdditional \fIattributes\fP may be specified after a '^' (caret)
Xcharacter in the form:
X.IP "\fIoffset\fP|\fIgravity\fP|\fIforeground\fP|\fIbackground\fP|\fIfont\fP"
XAny omitted parameters will be set to default values.
X.IP
X\fIoffset\fP is an integer specifying how far to place this
Xgadget from its nearest neighbor (or an edge). Default
Xoffset is \fBgadget.pad\fP, or 2 if \fBgadget.pad\fP is not
Xdefined.
X.IP
X\fIgravity\fP is one of \fBNoGravity\fP, \fBLeftGravity\fP,
X\fBRightGravity\fP or \fBCenterGravity\fP. \fBNoGravity\fP specifies that
Xthe gadget is to be placed opposite of wherever the last gadget was
Xplaced.
X\fBLeftGravity\fP specifies that the gadget should stick to
Xthe left of the title bar, \fBRightGravity\fP to the right and
X\fBCenterGravity\fP to the center.
X.IP
X\fIforeground\fP and \fIbackground\fP specify the colors used to
Xtile the gadget or draw the text.
X.IP
X\fIfont\fP is the name of the font you want the gadget's name
Xdrawn in. This overrides the \fBgadget.font\fP setting for this
Xgadget.
X.IP
XThe default values for \fIattributes\fP are 0, \fBNoGravity\fP, black
X(\fBreverse\fP: white) and white (\fBreverse\fP: black), the setting
Xof \fBgadget.font\fP.
X.PP
XIt is important to note that in the absence of a \fIgravity\fP specification
X(i.e. we've defaulted to \fBNoGravity\fP), the window manager will
Xautomatically place a gadget on the side opposite of the last gadget
Xplaced. If it's the first gadget placed, it will go to the right.
XThus in the absence of any \fIgravity\fP (or \fIoffset\fP) specifications,
Xthe window manager will place gadgets in a right-left-right fashion
Xuntil all gadgets have been placed.
X.PP
XFor example:
X.EX
Xgadget[0] = "die"
Xgadget[1] = (resize.b) ^ 2 | red | orange
Xgadget[2] = (iconbox.b) ^ | LeftGravity
Xgadget[3] = "\\56" ^ | LeftGravity | green | black | cursor
X.EE
X.PP
XThese declarations will create 4 gadget boxes, situated in the
Xfollowing manner:
X.PP
XThe first gadget box will be created wide enough to print the
Xword "die" in it (in whatever gadget font has been defined) and
Xwill be placed on the right side (since it hasn't chosen a gravity)
Xagainst the edge (since it hasn't chosen an offset).
XBackground and foreground colors will be black and white
X(assignment depending on whether \fBreverse\fP is set).
X.PP
XThe second gadget box will be tiled with the contents of the
Xfile "resize.b" (assuming that it's a valid bitmap file) and
Xwill go on the left side (since it also has no gravity and the
Xlast one went on the right). It will be offset from the edge by 2
Xpixels since there was an offset for it. Foreground will be
Xred, background will be orange.
X.PP
XThe third gadget will be tiled with the contents of "iconbox.b"
Xand will be placed against the second gadget on the left hand
Xside since we specified a gravity. Colors will be black and white
X(depending on \fBreverse\fP).
X.PP
XThe fourth gadget will display glyph #56 from the cursor font
Xin green and black (it's gumby of course).
X.PP
XIMPORTANT: Gadgets may be declared in any order, but you are
Xnot allowed to leave gaps, i.e..it's perfectly acceptable to
Xdeclare gadgets in the order 0, 2, 3, 1, but \fBnot\fP legal to
Xdeclare gadgets in the order 0, 3, 2, 4 as gadget #1 has been
Xomitted. This restriction may be removed in the future, but
Xfor now you'll get a diagnostic and \fIawm\fP will exit.
X.PP
XAll other variables controlling window manager behavior are described in
Xthe \fBX DEFAULTS\fP section of this man page.
X.PP
X.SH BINDING SYNTAX
X.PP
XMouse buttons may be bound to particular window manager functions with:
X.EX
X"\fIfunction\fP=[\fImodifier key(s)\fP]:[\fIcontext\fP]:\fImouse events\fP:\fI" menu name "\fP
X.EE
Xor 
X.EX
X"\fIfunction\fP=[\fImodifier key(s)\fP]:[\fIcontext\fP]:\fImouse events\fP:\fI" text action "\fP
X.EE
X.PP
XFunction and mouse events are the only required fields.  The menu name is
Xrequired with the \fIf.menu\fP function definition only.
XSimilarly, text action is required only with the \fIf.action\fP
Xfunction definition.
X.PP
X.SH Function
X.PP
X.IP \fBf.action\fP
XInvokes a text action. `text' should be in quotes with a preceding
X"action" character (one of '^', '!' or '|'). The syntax is identical to
Xmenu text actions which are discussed in greater detail under the \fBMenus\fP
Xsection of this document.
X.EX 0
X.B
Xf.action=[\fImodifier key(s)\fP]:[\fIcontext \fP]:\fImouse events\fP:\fIaction" text "\fP
X.EE
X.IP "\fBf.beep\fP" 15
Xemits a beep from the keyboard.  Loudness is determined by 
Xthe volume variable.
X.IP \fBf.circledown\fP
Xcauses the top window that is obscuring another 
Xwindow to drop to the bottom of the stack of windows.  
X.IP \fBf.circleup\fP
Xexposes the lowest window that is obscured by other
Xwindows. 
X.IP \fBf.continue\fP
Xreleases the window server display action after you 
Xstop action with the \fBf.pause\fP function.  
X.IP \fBf.destroy\fP
Xcalls XKillClient on the selected window. Use with caution!! Binding it to
Xnaked mouse buttons is probably not a good idea!
X.IP \fBf.exit\fP
Xexits the window manager. If you've started \fIawm\fP from
X\fIxinit\fR (actually sort of useful now that the \fB\-e\fP flag
Xhas been added), this will also exit the window system.
X.IP \fBf.focus\fP
Xdirects all keyboard input to the selected window.
XTo reset the focus to all windows, invoke \fIf.focus\fP from the root
Xwindow.
X.IP \fBf.iconify\fP
XWhen implemented from a window, this function converts the window 
Xto its respective icon.  When implemented from an icon, 
Xf.iconify converts the icon to its respective window.  
X.IP \fBf.lock\fP
Xlocks the screen by displaying random (and somewhat pretty) patterns.
XThe lock can be exited by typing in your password or pulling the power
Xcord for your system out of its socket.
X.IP \fBf.lower\fP
Xlowers a window that is obstructing a window below it.
X.IP \fBf.menu\fP
Xinvokes a menu.  Enclose `menu name' in quotes if it
Xcontains blank characters or parentheses.  
X.EX 0
X.B
Xf.menu=[\fImodifier key(s)\fP]:[\fIcontext \fP]:\fImouse events\fP:\fI" menu name "\fP
X.EE
X.IP \fBf.move\fP
Xmoves a window or icon to a new location, which becomes the
Xdefault location.
X.IP \fBf.moveopaque\fP
Xmoves a window or icon to a new screen location.  When using this
Xfunction, the entire window or icon is moved to the new screen
Xlocation.  The grid effect is not used with this function.
X.IP \fBf.neaten\fP
Xneatens the desktop using the RTL neaten package. See the \fBX DEFAULTS\fP
Xfor the resources necessary to customize this somewhat complex feature.
XThis function only works if \fIawm\fP has been compiled with the -DNEATEN
Xflag (which compiles in the neaten package). Invoking this function without
Xthis is a noop (though a warning diagnostic is printed to stderr).
XSee the INSTALLATION section of the README document for more details.
X.IP \fBf.newiconify\fP
Xallows you to create a window or icon and then position the window or
Xicon in a new default location on the screen.
X.IP \fBf.pause\fP
Xtemporarily stops all display action.  To release the screen and
Ximmediately update all windows, use the \fBf.continue\fP function.
X.IP \fBf.pushdown\fP
Xmoves a window down.  
XThe distance of the push is determined by the push variables.
X.IP \fBf.pushleft\fP
Xmoves a window to the left.  
XThe distance of the push is determined by the push variables.
X.IP \fBf.pushright\fP
Xmoves a window to the right.  
XThe distance of the push is determined by the push variables.
X.IP \fBf.pushup\fP
Xmoves a window up.  
XThe distance of the push is determined by the push variables.
X.IP \fBf.raise\fP
Xraises a window that is being obstructed by a window
Xabove it.
X.IP \fBf.refresh\fP
Xresults in exposure events being sent to the window server clients 
Xfor all exposed or partially exposed windows.
XThe windows will not refresh correctly if the exposure events 
Xare not handled properly.
X.IP \fBf.resize\fP
Xresizes an existing window.  Note that some clients, notably
Xeditors, react unpredictably if you resize the window while the
Xclient is running.
X.IP \fBf.restart\fP
Xcauses the window manager application to restart,
Xretracing the \fIawm\fP search path and initializing the variables it
Xfinds.
X.IP \fBf.\fP[\fBno\fP]\fBdecorate\fP
Xadds or removes "decorations" on the selected window. What decorations are
Xadded (or deleted) depends on the settings of various booleans and
Xclient-specific resources (see: \fBSPECIAL RESOURCES\fP).
X
XThe booleans \fBtitles\fP, \fBgadgets\fP and \fBborderContext.width\fP
Xcurrently influence \fBawm\fP's choice of default decorations.
X.PP
X.SH Modifier Keys
X.PP
XIt is preferable to use meta as a modifier key for \fBawm\fP (or
Xany other window manager, for that matter), but one may also
Xuse ctrl, shift, lock, or null (no modifier key).  
XModifier keys must be entered in lower case, and can be
Xabbreviated as: c, l, m, s  for ctrl, lock, meta, and shift,
Xrespectively. It's also permissible to refer to the the modifier
Xkeys directly as "mod1, mod2, mod3, mod4 or mod5". A mouse button
Xwith no modifier key(s) is often referred to as a "naked" mouse
Xbutton.
X.PP
XYou may bind any number of modifier keys to a function,
Xuse the bar (|) character to combine them.
X.PP
X.SH Context
X.PP
XThe context refers to the screen location of the cursor when a 
Xcommand is initiated.  When you include a context entry in a 
Xbinding, the
Xcursor must be in that context or the function will not be
Xactivated.
XThe window manager recognizes the following seven contexts: 
Xicon, window, root, title, gadget[\fIn\fP] (where \fIn\fP is the
Xgadget number), border and (null).
X.PP
XThe icon context refers to any icon and may be safely bound without
Xinterfering with window events.
X.PP
XThe window context refers to application windows and should be
Xused carefully to avoid usurping button events that applications
Xmay want for their own purposes.
X.PP
XThe root context refers to the root, or background window.
X.PP
XThe title context refers to the titlebar area of a window, if
Xone exists.
X.PP
XThe gadget context (with mandatory index) specifies a given
Xgadget box. Binding to a gadget that's undefined (not initialized to
Xanything) is an error.
X.PP
XThe border context refers to the artificial border area created when
Xthe resource \fBborderContext.width\fP is defined (see \fBborderContext.width\fP
Xunder \fBX DEFAULTS\fP). Using this context when no border area exists
X(i.e. \fBborderContext.width\fP is not defined) is a noop.
X.PP
XA (null) context is indicated when the context field is left blank,
Xand allows a function to be invoked from any screen location. This
Xis basically equivalent to specifying all the possible contexts.
X.PP
XCombine contexts using the bar (|) character.
X.PP
X.SH Mouse Buttons
X.PP
XAny of the following mouse buttons are accepted (in lower case)
Xand may be abbreviated as l, m, or r, respectively:  left, 
Xmiddle, right.
X.PP
XWith the specific button, you must identify 
Xthe action of that button.  Mouse actions 
Xcan be: 
X.IP "\fBdown\fP" 10 
Xfunction occurs when the specified button is pressed down.
X.IP \fBup\fP
Xfunction occurs when the specified button is released.
X.IP "\fBdelta\fP" 10
Xindicates that the mouse must be moved the number of pixels specified 
Xwith the delta variable before the specified function is invoked.
XThe mouse can be moved in any direction 
Xto satisfy the delta requirement.
X.PP
X.SH MENU DEFINITION 
X.PP
XAfter binding a set of function keys and a menu name to
X\fBf.menu\fP, you must define the menu to be invoked, using the
Xfollowing syntax:
X.EX
X\fBmenu \fP= (\fIstring\fP) " \fImenu name\fP " {
X"\fIitem name\fP" : "\fIaction\fP"
X       . 
X       .
X       .
X}
X.EE
X.PP
XThe \fIstring\fP in parenthesis is an optional argument which
Xnames a pixmap file (see also: \fBpath\fP) to use as
Xthe menu title rather than just using the name of the menu. This
Xis generally only useful if you're using pixmaps for the menu
Xpanes as well (see below). Though the \fImenu name\fP isn't displayed
Xwhen you specify \fIstring\fP, you still need to specify one for \fIawm\fP
Xto use when looking up the binding to it.
X.PP
XEnter the \fImenu name\fP exactly the way it is entered with the 
X\fBf.menu\fP function or the window manager will not recognize the link.
XIf the \fImenu name\fP contains blank strings, tabs or parentheses, it must
Xbe quoted here and in the \fBf.menu\fP function entry.  If you haven't
Xchosen to display a pixmap title in \fIstring\fP, the menu name will be
Xdisplayed at the top of the menu in whatever font has been chosen
Xfor \fBmenu.boldFont\fP (or its default).
X.PP
XYou can enter as many menu items as your screen is long.  You  
Xcannot scroll within menus.
X.PP
XAny menu entry that contains quotes, special characters,
Xparentheses, tabs, or strings of blanks must be enclosed 
Xin double quotes.  Follow the item name by a colon (:).
X.PP
XA special case is an item surrounded by parenthesis, which
Xdesignates the \fIitem name\fP as the name of a pixmap file to
Xtile the menu pane with. Given a pixmap for the menu title as well
X(see above), it's possible to create menus that are totally
Xpictorial in nature. There are, however, two caveats. Due to the fact
Xthat it's easier to do, the pixmaps are used as backgrounds
Xfor the menu panes rather than painting them on whenever a given pane in
Xexposed. This has rather ugly consequences if one of the pixmaps
X(or a line of text if a pane is textual) is larger than the others.
XSince the server replicates pixmaps over the entire window, it results
Xin a "wallpaper" effect on the smaller pixmaps. The solution is to make all
Xthe pixmaps the same size and/or not mix in any text items that will need a
Xwider pane. 
X.PP
XThe second problem is that the check marks and pull-right indicators are
Xalways displayed in fixed positions on the right and left edges of menu
Xpanes. If your pixmaps try to use this real-estate, they may be partially
Xcovered by a check mark or pull-right pixmap. Design your menus with this
Xin mind.
X.PP
X.SH Menu Action
X.IP "Window manager functions"
XAny function previously described, e.g., \fBf.move\fP or \fBf.iconify\fP.
XUsing \fBf.menu\fP results in a pull-right pane which you can use to "walk"
Xbetween menus (see below). A "walk" can be done by moving the cursor onto
Xthe pull-right arrow displayed at the right edge of the pane, or by clicking
Xanother button in the pane while holding the original one down.
X.IP "Walking menus"
XSelect the function \fBf.menu\fP and separate it from the \fImenu name\fP with
Xa colon (:) i.e.
X.EX
Xmenu = "foo" {
X...
XWalking Menu:        f.menu:  "NextMenu"
X...
X}
X.EE
X.IP "Text actions"
XThere are two kinds of special "actions" involving arbitrary strings
Xof text. These are:
X.IP "Shell commands"
XBegin with an exclamation point (!) and set to run in
Xbackground.  You cannot include a new line character within a shell
Xcommand. 
X.IP "Text strings"
XText strings are placed in the window server's cut buffer. The strings
Xmust be preceeded by one of:
X.IP
XA carat (^), which is stripped off, signifies that
Xthe string will automatically be followed by a newline (I.E using '^'
Xcauses one to be added at the end).
X.IP
XA vertical bar (|), also stripped off, signifies the the string
Xshould not end with a newline.
X.IP "Booleans"
XAny boolean variable previously described, e.g., \fBreverse\fP or
X\fBautoraise\fP.  The current state of a boolean variable in a menu
Xwill be indicated with a check mark (a check mark means the boolean is
Xset to true). Note that the boolean is *not* preceeded by "awm." as
Xit is in the resource database.
X.PP
XSPECIAL NOTE:
X.PP
XMenus bound to title bars, gadget boxes or borders cause (where logical)
Xthe selected menu action to occur automatically on the client window
Xas opposed to having to select a window for the action. However, actions
Xrequiring mouse tracking (i.e. move, resize) will usually \fBnot\fP work well
Xin this context. While this limitation will be eliminated in the near future,
Xit is suggested that you use this feature to do things that do not
Xrequire mouse tracking, such as raise, lower, iconify, etc.
X.PP
X.SH Color Defaults
X.PP
XColors default to the colors of the root window 
Xunder any of the following conditions:
X.IP 1)
XIf you run out of color map entries, either before or during an
Xinvocation of \fIawm\fP.
X.IP 2)
XIf you specify a foreground or background color that does 
Xnot exist in the RGB color database ($LIBDIR/\fIrgb.txt\fP).
X.IP 3)
XIf you omit a foreground or background color.
X.IP 4)
XIf you specify no colors in the resource database.
X.bp
X.SH X DEFAULTS
X.PP
XA number of variables that used to be specified in the \fI.uwmrc\fP file (of
X\fIuwm\fP, for those familiar with it) are now retrieved from
Xthe resource database. When a value cannot be found, a default 
X(compiled into \fIawm\fP) is substituted. A much wider range of
Xoptions can be specified this way and it is suggested that you
Xread the following section carefully before bringing up
Xawm.
X.PP
XIn the descriptions below, variable names are listed in boldface,
Xtheir type in parenthesis, and their default value in double quotes.
XAll resources are preceeded by an implied "awm.", as is the standard.
XI.E. "autoraise" would be specified as: "awm.autoraise: ..." in the
Xresource database.
X.sp
X.IP "\fBautoraise\fP (boolean) ``off''"
XAutomatically raise a window to the top when it gains the
Xinput focus. See also: \fBraiseDelay\fP
X.IP "\fBautoselect\fP (boolean) ``off''"
XSpecifies that the pointer be placed over the first
Xitem in a menu, rather than the title, when the menu is popped up.
X.IP "\fBbackground\fP (string)"
XThe default background color for all other color
Xchoices in \fIawm\fP. If \fBreverse\fP is not set, this defaults
Xto white, otherwise it defaults to black.
XReferences to \fBbackground\fP in this document
Xrefer to this resource.
X.IP "\fBborder.foreground\fP (boolean) ``\fBforeground\fP''"
XSpecifies the border color to use for all windows (this color
Xmay be drawn solid or stippled, depending on the window focus and
Xthe setting of \fBborder.hilite\fP).
X.IP "\fBborder.hilite\fP (boolean) ``on''"
XSpecifies whether or not window border colors are to
Xbe changed on focus changes. On focus in, the window border is
Xchanged to solid \fBborder.foreground\fP. On focus out, it is changed to a
X"gray" stipple.
X.IP "\fBborderContext.background\fP (string) ``\fBbackground\fP''"
XBackground color to use for border context pixmap.
XValue is meaningless if \fBborderContext.width\fP and \fBborderContext.pixmap\fP are undefined.
X.IP "\fBborderContext.boldPixmap\fP (string) ``none''"
XThe name of a pixmap file to load and tile the border context area
Xwith when the focus is in. If this is defined, and \fBhilite\fP is set,
Xfocus changes will cause the border context background to alternate between
X\fBborderContext.pixmap\fP and \fBborderContext.boldPixmap\fP. If \fBborderContext.boldPixmap\fP
Xis defined, but \fBborderContext.pixmap\fP is not, a blank pixmap will be used in place of
X\fBborderContext.pixmap\fP.
X.IP "\fBborderContext.cursor\fP (int) ``XC_cross''"
XGlyph (in decimal) to retrieve from cursor font for use in
Xborder context.
X.IP "\fBborderContext.foreground\fP (string) ``\fBforeground\fP''"
XForeground color to use for border color pixmap.
XValue is meaningless if \fBborderContext.width\fP and \fBborderContext.pixmap\fP are undefined.
X.IP "\fBborderContext.pixmap\fP (string) ``\fBbackground\fP"
XPixmap to display as border context area background.
XValue is meaningless is \fBborderContext.width\fP is undefined (or set to zero).
XUsed exclusively as the background unless \fBborderContext.boldPixmap\fP and
X\fBhilite\fP are defined.
X.IP "\fBborderContext.width\fP (int) ``0''"
XNumber of pixels wide to make the border context. Though
Xfunctions may be bound to the border context (see: \fBContext\fP)
Xwithout setting this, they will be impossible to invoke due to the
Xfact that there will be nothing to click on. The border context
Xshould not be confused with the actual window border. It is an
Xartificial area around each window that resembles a border.
X.IP "\fBdelta\fP (int) ``1''"
XNumber of pixels that must be moved over before a "delta" action
Xis taken (see: \fBBINDING SYNTAX\fP).
X.IP "\fBforeground\fP (string)"
XThe default foreground color for all other color
Xchoices in \fIawm\fP. If \fBreverse\fP is not set, this defaults
Xto black, otherwise it defaults to white. 
XReferences to \fBforeground\fP in this document
Xrefer to this resource.
X.IP "\fBframeFocus\fP (boolean) ``off''"
X[De]highlight when the pointer [leaves] enters the "frame" of the
Xwindow (the frame includes the client window, title bar and border context
Xareas, if present). Setting this option also causes the focus to follow
Xthe pointer so that keyboard input will go the the client regardless of
Xwhere the pointer is in the "frame".
X.IP "\fBfreeze\fP (boolean) ``off''"
XLock out all other clients during certain window manager tasks,
Xsuch as move and resize.
X.IP "\fBgadget.border\fP (int) ``1''"
XThe width of all gadget borders in pixels.
X.IP "\fBgadget.font\fP (string) ``fixed''"
XWhich font to use for (textual) gadget labels.
X.IP "\fBgadget.pad\fP (int) ``3''"
XThe number of pixels to pad a gadget from its neighbor if it has
Xno offset defined.
X.IP "\fBgadgets\fP (boolean) ``off''"
XDisplay gadgets in title bars, if any are declared.
X.IP "\fBgrid\fP (boolean) ``off''"
XDisplay a finely ruled grid when positioning or resizing
Xwindows/icons.
X.IP "\fBhilite\fP (boolean) ``off''"
XCauses the following actions to occur when a window gains the input
Xfocus:
X.EX
X1. If \fBshowName\fP is on:
X
X   1a.	If \fBtitle.boldFont\fP is defined, the window name is redrawn
X	in this font.
X
X   1b.	If it's not, then the window name is redrawn in reverse video.
X
X2. If \fBtitle.boldPixmap\fP is defined, the background of the title bar
X   is set to it.
X
X3. If \fBborderContext.boldPixmap\fP is defined, the background of the border
X   context area is set to it.
X.EE
X.IP
XOn focus out, the window name is redrawn in \fBtitle.font\fP
Xthe title background to \fBtitle.pixmap\fP and the border context
Xto \fBborderContext.pixmap\fP, respectively.
X.IP
XIf \fBborder.hilite\fP is undefined, this variable will set it
Xautomatically.
X.PP
X\fBNote that most icon variables only affect icons owned by \fIawm\fP.
XExcept for foreground and background colors, client created
Xicons are left alone.\fR
X.IP "\fBicon.background\fP (string) ``\fBbackground\fP''"
XIcon (pixmap) background color.
X.IP "\fBicon.backpixmap\fP (string) ``grey''"
XPixmap to display as icon background for text icons.
XNote that this pixmap is only used for "text" icons, I.E. icons
Xin the \fBuwm\fP style of a line of editable text. This should
Xtypically be cross hatch pattern or some similar background weave
Xthat will be displayed surrounding the text. For "pictoral" icons,
Xuse \fBicon.defpixmap\fP.
XSee also: \fBpath\fP, \fBicon.foreground\fP, \fBicon.background\fP,
X\fBicon.defpixmap\fP.
X.IP "\fBicon.border\fP (string) ``\fBicon.foreground\fP''"
XColor to use for icon borders.
X.IP "\fBicon.borderWidth\fP (int) ``2''"
XWidth of icon border in pixels.
X.IP "\fBicon.defpixmap\fP (string) ``xlogo''"
XFor windows that don't specify their own pixmaps, use this image.
XThis is only useful if \fBicon.labels\fP is turned on.
X.IP "\fBicon.font\fP (string) ``8x13''"
XWhich font to use for icon text.
X.IP "\fBicon.foreground\fP (string) ``\fBforeground\fP''"
XIcon (pixmap) foreground color.
X.IP "\fBicon.hPad\fP (int) ``2''"
XNumber of pixels to pad icon text horizontally.
X.IP "\fBicon.labels\fP (boolean) ``off''"
XSpecifys that icons should be displayed in the "twm" style. I.E.
XThe icon pixmap (or \fBicon.defpixmap\fP if the window has no icon
Xpixmap) with the icon name displayed underneath (or above, if
X\fBicon.labelTop\fP is set).
X.IP "\fBicon.labelTop\fP (boolean) ``off''"
XSpecifys that "labeled" icons should have the text portion displayed
Xon top, rather than the bottom. Only useful if \fBicon.labels\fP is
Xset.
X.IP "\fBicon.vPad\fP (int) ``2''"
XNumber of pixels to pad icon text vertically.
X.IP "\fBicon.text.background\fP (string) ``\fBicon.background\fP''"
XBackground color to use for icon text.
X.IP "\fBicon.text.foreground\fP (string) ``\fBicon.foreground\fP''"
XForeground color to use for icon text.
X.IP "\fBinstallColormap\fP (boolean) ``false''"
XInstall a given window's colormap when the pointer enters it.
XWhen the pointer leaves, the default colormap is installed.
X.IP "\fBmenu.background\fP (string) ``\fBbackground\fP''"
XMenu background color.
X.IP "\fBmenu.boldFont\fP (string) ``8x13bold''"
XWhich font to use for (textual) menu panes. Currently,
Xthe only pane using this font is the title pane (unless, of course,
Xit's a pixmap).
X.IP "\fBmenu.border\fP (string) ``\fBforeground\fP''"
XMenu border color.
X.IP "\fBmenu.borderWidth\fP (int) ``2''"
XWidth of menu border in pixels.
X.IP "\fBmenu.delta\fP (int) ``20''"
XNumber of pixels to move on a "pull-right" pane before the submenu
Xattached to it is popped up.
X.IP "\fBmenu.font\fP (string) ``8x13''"
XWhich font to use in (textual) menu panes.
X.IP "\fBmenu.foreground\fP (string) ``\fBforeground\fP''"
XMenu foreground color.
X.IP "\fBmenu.itemBorder\fP (int) ``1''"
XWidth of individual (menu) item borders.
X.IP "\fBmenu.pad\fP (int) ``2''"
XNumber of pixels to pad menu text/pixmaps vertically.
X.PP
XThe following resources pertain only to the RTL Neaten package and are
Xignored if \fIawm\fP has not been compiled with that option (see the
XINSTALLATION file).
X.IP "\fBneaten.absMinWidth\fP (int) ``64''"
XIndicates the amount of space in pixels, that is used
Xas the absolute minimum width of a window during the
Xneaten operation.
X.IP "\fBneaten.absMinHeight\fP (int) ``64''"
XIndicates the amount of space in pixels, that is used
Xas  the absolute minimum height of a window during the
Xneaten operation.
X.IP "\fBneaten.retainSize\fP (boolean) ``true''"
XForces to windows to be at least their current size.
XWindows may overlap as a side effect.
X.IP "\fBneaten.fill\fP (boolean) ``true''"
XAllows windows to grow to their maximum size during
Xthe neaten  operation. Normally a window will grow only to
Xthe maximum  of its desired (based on the WM_NORMAL_HINTS property)
Xand current size.
X.IP "\fBneaten.fixTopOfStack\fP (boolean) ``true''"
XFixes the size and location of the window at the top of
Xthe  window  hierarchy.  If necessary, this window will
Xoverlap even other windows which can not be tiled.
X.IP "\fBneaten.keepOpen\fP (boolean) ``true''"
XConstrains all windows to remain open during the neaten
Xoperation.   No  windows will be iconized.  This operation
Xmay cause windows to overlap.
X.IP "\fBneaten.usePriorities\fP (boolean) ``true''"
XAssigns the windows priorities based on their stacking
Xorder (windows closer to the top in the stacking order
Xare given higher priorities). Priorities are used when
Xdetermining size and location of windows on the screen.
X.IP "\fBneaten.primaryIconPlacement\fP (string) ``\fBTop\fP''"
XSelects the side of the screen where icons are first
Xplaced.  Legal values are: \fBTop\fP, \fBLeft\fP, \fBBottom\fP, \fBRight\fP and
X\fBClosest\fP (to its current position).
X.IP "\fBneaten.secondaryIconPlacement\fP (string) ``\fBLeft\fP''"
XDetermines where along the specified primary side
Xthe icon should be placed. Legal values are those for
X\fBneaten.primaryIconPlacement\fP plus \fBCenter\fP.
XNot used if \fBneaten.primaryIconPlacement\fP is \fBClosest\fP
X.IP "\fBnormali\fP (boolean) ``on''"
XMake sure that icons created with \fBf.newiconify\fP stay wholly within
Xthe root window (on screen), regardless of attempted placement.
XIf off, put icons
Xwherever the cursor is placed.
X.IP "\fBnormalw\fP (boolean) ``on''"
XMake sure that windows mapped with \fBf.newiconify\fP are placed on-screen,
Xregardless of cursor position.
XIf off, put windows wherever the cursor is placed.
X.IP "\fBpath\fP (string) ``null''"
XA number of items (titles, menus, etc) now allow you to specify
Xa pixmap file, rather than just a text string to display. Since it
Xwould be tedious to type in full pathnames for these files if they
Xall lived in the same places, the directory(s) named by \fBpath\fP are
Xsearched if the pixmap file's pathname does not begin with a slash (/)
Xor tilde (~) and is not found in the current directory.
X.IP
X\fBpath\fP is a white-space separated list of one or more
Xdirectories to search, much like that used by the Unix C-shell. The ~
Xnotation used to designate your (or someone else's) home directory is
Xsupported, but wildcards are not.
X.IP "\fBpopup.background\fP (string) ``\fBbackground\fP''"
XBackground color to use for pop-up text.
X.IP "\fBpopup.borderWidth\fP (int) ``2''"
XWidth of pop-up window border in pixels.
X.IP "\fBpopup.font\fP (string) ``9x15''"
XWhich font to use for popup window text.
X.IP "\fBpopup.foreground\fP (string) ``"\fBforeground\fP''
XForeground color to use for pop-up text.
X.IP "\fBpopup.pad\fP (int) ``4''"
XNumber of pixels to pad pop-up text horizontally.
X.IP "\fBpushRelative\fP (boolean) ``on''"
XWhen a window is pushed, push 1/\fBpush\fP of the window.
XIf off, move window \fBpush\fP pixels.
X.IP "\fBraiseDelay\fP (int) ``100''"
XAmount of time in milliseconds to wait (while window has focus)
Xbefore raising. If pointer leaves window before time elapses, raise is not
Xperformed.
X.IP "\fBreverse\fP (boolean) ``on''"
XReverse background/foreground colors for titles, menus,
Xgadget windows, popup windows, etc. In the absence of any color
Xspecifications, this results in black-on-white.
X.IP "\fBrootResizeBox\fP (boolean) ``on''"
XPut the resize (popup) window in the upper left corner of the root
Xwindow, rather than on the window being resized. This saves a potentially
Xexpensive refresh that would occur when the popup was unmapped. If your server
Xsupports save-unders,
Xit's generally (but not always) better to turn \fBsaveUnder\fP
Xon instead.
X.IP "\fBsaveUnder\fP (boolean) ``off''"
XUse save-unders for menus and pop-up windows. If the server does not
Xsupport save-unders, this action does nothing.
X.IP "\fBshowName\fP (boolean) ``on''"
XDisplay the window name in a title (assuming that the window is titled
Xin the first place).
X.IP "\fBtitle.background\fP (string) ``\fBbackground\fP''"
XBackground color to use for title pixmap.
X.IP "\fBtitle.boldFont\fP (string) ``none''"
XWhich font to use for titlebar labels if focus is and
X\fBhilite\fP is enabled. If this isn't set, and \fBhilite\fP
Xis, the title text will be displayed with \fBtitle.font\fP in reverse video.
X.IP "\fBtitle.boldPixmap\fP (string) ``none''"
XThe name of a pixmap file to load and tile titlebars with when
Xthe focus is in. If this is defined, and \fBhilite\fP is set, focus changes
Xwill cause title backgrounds to alternate between \fBtitle.pixmap\fP
Xand \fBtitle.boldPixmap\fP. If \fBtitle.boldPixmap\fP is defined, but
X\fBtitle.pixmap\fP is not, a blank pixmap will be used in place of
X\fBtitle.pixmap\fP.
X.IP "\fBtitle.cursor\fP (int) ``XC_left_ptr''"
XGlyph (in decimal) to retrieve from cursor font for use in
Xtitle bar.
X.IP "\fBtitle.font\fP (string) ``vtsingle''"
XWhich font to use for titlebar labels. Used exclusively unless
X\fBtitle.boldFont\fP and \fBhilite\fP are set.
X.IP "\fBtitle.foreground\fP (string) ``\fBforeground\fP''"
XForeground color to use when drawing background (both normal and
Xbold) pixmaps.
X.IP "\fBtitle.pad\fP (int) ``2''"
XNumber of pixels to pad title bar text vertically.
X.IP "\fBtitle.pixmap\fP (string) ``none''"
XThe name of a pixmap file to load and tile titlebars with.
XThis background is use exclusively unless the \fBtitle.boldPixmap\fP is
Xdefined and \fBhilite\fP is set.
X.IP "\fBtitle.text.background\fP (string) ``\fBtitle.background\fP''"
XBackground color to use when drawing title bar text.
X.IP "\fBtitle.push\fP (boolean) ``false''"
XWhen adding a title bar or border context to a window, put the border or
Xtitle bar area at the current x, y position and "push" the window down to
Xmake room. For windows with an upper edge at or near the top of the screen,
Xthis gives the most asthetically pleasing results. For windows near the
Xbottom, it does not.
XIf set to false, the title bar/border will be added "on top" and the window
Xwill not be moved down. Note that the setting of this resource also affects
Xhow the window is maniplated during resizes, title removals, etc.
X.IP "\fBtitle.text.foreground\fP (string) ``\fBtitle.foreground\fP''"
XForeground color to use when drawing title bar.
X.IP "\fBtitles\fP (boolean) ``off''"
XPut title bars on all windows (both existing windows and new ones as
Xthey're created. See also: \fBf.title\fP
X.IP "\fBvolume\fP (int) ``2''"
XSpecifies the bell volume (delta on volume set with \fIxset\fP).
X.IP "\fBwall\fP (boolean) ``off''"
XRestrict window movement to edges of screen (rootwindow).
XThis feature is fairly handy and should probably be bound to a menu
Xso that it can readily be turned on and off.
X.IP "\fBwarpOnDeIconify\fP (boolean) ``off''"
XWarp pointer to upper right corner of window on de-iconify.
X.IP "\fBwarpOnIconify\fP (boolean) ``off''"
XWarp pointer to center of icon on iconify.
X.IP "\fBwarpOnRaise\fP (boolean) ``off''"
XWarp pointer to upper left corner of window on raise.
X.IP "\fBwindowName.offset\fP (int) ``0''"
XNumber of pixels from the right or left edge of a titlebar
Xto print the window name (assuming that \fBshowName\fP is set).
XIf this value is negative, the name will be offset \fBnameOffset\fP
X(plus the name length) pixels from the right edge. If the value
Xis positive, then the name will be offset \fBnameOffset\fP pixels
Xfrom the left edge. If the value is zero, the name will be centered.
XSince the length of a window name can vary dynamically, this value
Xwill be adjusted, when necessary, to ensure that the name is visible in
Xthe title bar.
X.IP "\fBzap\fP (boolean) ``off''"
XCauses ghost lines to follow the window or icon from its previous
Xlocation to its new location during a move, resize or iconify operation.
X.PP
X.SH SPECIAL RESOURCES
X.IP "\fIname\fP\fB.wm_option.autoRaise\fP (boolean) "
X.IP "\fIname\fP\fB.wm_option.borderContext\fP (boolean) "
X.IP "\fIname\fP\fB.wm_option.gadgets\fP (boolean) "
X.IP "\fIname\fP\fB.wm_option.icon.labels\fP (boolean) "
X.IP "\fIname\fP\fB.wm_option.title\fP (boolean) "
X.IP "\fIname\fP\fB.wm_option.foreground\fP (string) " [ Only if -DRAINBOW ]
X.IP "\fIname\fP\fB.wm_option.background\fP (string) " [ Only if -DRAINBOW ]
X
XThese resources determine whether or not a given application really wants
Xa title, gadgets, border context area, to be auto-raised etc etc..
XThe application's CLASS and NAME (in the WM_CLASS property) are checked
Xagainst the string supplied for \fIname\fP (for example:
XXclock*wm_option.title:  off).
X.IP
XSpecifying one of these resources overrides any other boolean
Xsettings (I.E. \fBawm.titles\fP or \fBawm.gadgets\fP) and
Xmay be used to turn things on and off at the application and/or
Xclass level for applications, regardless of \fBawm\fP's settings.
X
XNote: Both class and name resources are checked, and in that order. Thus
Xspecific applications may override settings for their class, if desired.
X.IP
XThese resources are ``special'' as they are checked for under the
Xapplication's name, not \fIawm\fP's; I.E. \fBxclock.wm_option.autoRaise\fP
Xis not \fBawm.xclock.wm_option.autoRaise\fP as one might think.
X
XThe resources \fBwm_option.foreground\fP and \fBwm_option.background\fP are
Xonly meaningful if awm has been compiled with -DRAINBOW. They allow
Xthe border color to be specified for individual applications/classes.
X.bp
X.SH EXAMPLES
X.PP
XThe following sample startup file shows the default window
Xmanager options:
X.EX
X# Global variables
X#
Xresetbindings
Xresetmenus
X#
X# Mouse button/key maps
X#
X# FUNCTION    KEYS  CONTEXT  BUTTON    MENU(if any)
X# ========    ====  =======  ======    ============
Xf.menu =      meta  :     :left down   :"WINDOW OPS"
Xf.menu =      meta  :     :middle down :"EXTENDED WINDOW OPS"
Xf.move =      meta  :w|i  :right down
Xf.circleup =  meta  :root :right down
X#
X# Menu specifications
X#
Xmenu = "WINDOW OPS" {
X"(De)Iconify":  f.iconify
XMove:           f.move
XResize:         f.resize
XLower:          f.lower
XRaise:          f.raise
X}
X
Xmenu = "EXTENDED WINDOW OPS" {
XCreate Window:                  !"xterm &"
XIconify at New Position:        f.lowericonify
XFocus Keyboard on Window:       f.focus
XFreeze All Windows:             f.pause
XUnfreeze All Windows:           f.continue
XCirculate Windows Up:           f.circleup
XCirculate Windows Down:         f.circledown
X}
X.EE
X.bp
X.PP
X.SH RESTRICTIONS
X.PP
XThe color specifications have no effect on a monochrome system.
XThere's currently no way to specify a keysym in place of a button
X(up/down/delta) specification. This restriction will be removed in
Xthe near future.
X.PP
X.SH FILES
X.PP
X.nf
X$LIBDIR/rgb.txt 
X$LIBDIR/font 
X/usr/skel/.awmrc
X$LIBDIR/awm/system.awmrc
X$HOME/.awmrc
X.fi
X.PP 
X.SH SEE ALSO
X.PP
XX(1), X(8C)
X.SH AUTHOR
X.PP
X.ce 3
XCopyright 1988
XArdent Computer Corporation
XSunnyvale, Ca
X.PP
XAll Rights Reserved
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted,
Xprovided that the above copyright notice appear in all copies and that
Xboth that copyright notice and this permission notice appear in
Xsupporting documentation, and that the name of Ardent Computer
XCorporation or the author not be used in advertising or publicity
Xpertaining to distribution of the software without specific, written
Xprior permission.
X.PP
X.ce 3
XCOPYRIGHT 1985, 1986
XDIGITAL EQUIPMENT CORPORATION
XMAYNARD, MASSACHUSETTS
XALL RIGHTS RESERVED.
X.LP
XTHE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
XSHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
XDIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
XANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
X.LP
XIF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
XAPPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
XSET FORTH ABOVE.
X.LP
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting documentation,
Xand that the name of Digital Equipment Corporation not be used in advertising
Xor publicity pertaining to distribution of the software without specific, 
Xwritten prior permission.
X.PP
XM. Gancarz,
XDEC Ultrix Engineering Group, Merrimack, New Hampshire, using some algorithms
Xoriginally by Bob Scheifler, MIT Laboratory for Computer Science
X.PP
XJ. Hubbard, U.C. Berkeley, Berkeley, Ca. Ardent Computer, Sunnyvale,
XCa. Various modifications and enhancements using code developed by M.
XGancarz and Digital Equipment Corp.
END_OF_FILE
if test 41691 -ne `wc -c <'awm.man'`; then
    echo shar: \"'awm.man'\" unpacked with wrong size!
fi
# end of 'awm.man'
fi
echo shar: End of archive 2 \(of 12\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 12 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
Moderator of comp.sources.x