jkh@VIOLET.BERKELEY.EDU (Jordan K. Hubbard) (04/13/88)
My apologies for those who were to beta test this, I went abroad just as it was supposed to be sent out. You will all receive copies shortly (as soon as I get myself together). In the mean time, here's the man page for all to scorn and ridicule. Any comments heartily appreciated. Please note that this is just the man page, the actual release will contain a fairly explanatory README as well as a short blurb on how it differs from uwm and how best to use the new features. I may even include sample .Xdefaults and .awmrc files. Many apologies for the delays, this program has the dubious distinction of being my first large X11 project. Jordan Hubbard -----------------------nroff -man what follows------------------------ .de EX \"Begin example .ne 5 .if n .sp 1 .if t .sp .5 .nf .in +.5i .. .de EE .fi .in -.5i .if n .sp 1 .if t .sp .5 .. .TH AWM 1 "20 March 1988" "X Version 11" .SH NAME .PP awm - Window Manager Client Application of X .PP .SH SYNTAX .PP \fBawm \fP [-f \fIfilename\fP] [-e \fIexecfile\fP] [-b] .PP .SH DESCRIPTION .PP The \fIawm\fP command is a window manager client application of the window server. It is heavily based on an earlier work by M. Gancarz of Digital Equipment Corporation (see the end of this document for appropriate disclaimers). .PP When the command is invoked, it traces a predefined search path to locate any \fIawm\fP startup files. If no startup files exist, \fIawm\fP initializes its built-in default file. .PP If startup files exist in any of the following locations, it adds the variables to the default variables. In the case of contention, the variables in the last file found override previous specifications. Files in the \fIawm\fP search path are: .sp \fI/usr/X11/lib/awm/system.awmrc $HOME/.awmrc\fP .PP To use only the settings defined in a single startup file, include the variables, \fBresetbindings\fP and \fBresetmenus\fP, at the top of that specific startup file. .PP .SH ARGUMENTS .IP "[-f \fIfilename\fP]" Names an alternate file as an \fIawm\fP startup file. .IP "[-e \fIexecfile\fP]" Names a file to exec (typically a shell script invoking other clients) after all startup files have been loaded. This is useful for minimizing the number of map/unmaps that occur when titlebars are added. .IP "[-b]" Causes awm to ignore the system startup file. .PP .SH STARTUP FILE VARIABLES .PP Variables are typically entered first, at the top of the startup file. Because of a merge with the resource manager, very few variables are set here now. The directives \fBresetbindings\fP and\fB resetmenus\fP are still allowed, as are gadget declarations of the form: .IP \fBgadget[\fP\fIn\fB]\fP=\fIexpr\fP .nf Where \fIn\fP is a positive integer indicating the gadget to initialize and \fIexpr\fP is one of the following: \fIstring\fP or "\fIstring\fP" [ ^ \fBattributes\fP ] Set the name of the gadget to \fIstring\fP. The name will be painted in the gadget box with the \fBGadgetFont\fP. (\fIstring\fP) [ ^ \fBattributes\fP ] Load a pixmap from the file named by \fIstring\fP and tile the gadget with it (see also: \fBBitmapDir\fP). Additional \fBattributes\fP may be specified after a '^' (carat) character in the form: \fIoffset\fP|\fIgravity\fP|\fIforeground\fP|\fIbackground\fP Any omitted parameters will be set to default values. \fIoffset\fP is an integer specifying how far to place this gadget from its nearest neighbor (or an edge). Default offset is \fBGadgetPad\fP, or 2 if \fBGadgetPad\fP is not defined. \fIgravity\fP is one of \fBNoGravity\fP, \fBLeftGravity\fP or \fBRightGravity\fP. \fBNoGravity\fP specifies that the gadget be placed opposite of wherever the last gadget was placed (not specifying gravity on any of the gadgets causes them to be placed in a right-left-right fashion). \fBLeftGravity\fP specifies that the gadget should stick to the left of the title bar, \fBRightGravity\fP to the right. \fIforeground\fP and \fIbackground\fP specify the colors used to tile the gadget or draw the text. If the number of colors exceeds \fBmaxcolors\fP, black and white will be used. The default values for \fBattributes\fP are 0, NoGravity, black (\fBreverse\fP: white) and white (\fBreverse\fP: black). For example: gadget[0] = "die" gadget[1] = (resize.b) ^ 2 | red | orange gadget[2] = (iconbox.b) ^ | LeftGravity These declarations would create 3 gadget boxes, situated in the following manner: The first gadget box will be created wide enough to print the word "die" in it (in whatever gadget font has been defined) and will be placed on the right edge, since it hasn't chosen a gravity and the default action is to start placing gadgets on the right side and then alternate between sides. Since it hasn't specified an offset, it will be placed against the right edge. Background and foreground colors will be black and white (assignment depending on whether \fBreverse\fP is set). The second gadget box will be tiled with the contents of the file "resize.b", assuming of course that it's a valid bitmap file. Since it has no gravity, it will go on the left side (since the last one went on the right), but will be offset from the edge by 2 pixels since we did specify an offset for it. Foreground will be red, background will be orange. The third gadget will be tiled with the contents of "iconbox.b" and will be placed against the second gadget on the left hand side since we specified a gravity. Colors will be black and white. .fi All other variables controlling window manager behaviour are described in the \fBX DEFAULTS\fP section of this man page. .PP .SH BINDING SYNTAX .PP "\fIfunction\fP=[\fIcontrol key(s)\fP]:[\fIcontext\fP]:\fImouse events\fP:\fI" menu name "\fP .PP Function and mouse events are required input. Menu name is required with the \fIf.menu\fP function definition only. .PP .SH Function .IP "\fBf.beep\fP" 15 emits a beep from the keyboard. Loudness is determined by the volume variable. .IP \fBf.circledown\fP causes the top window that is obscuring another window to drop to the bottom of the stack of windows. .IP \fBf.circleup\fP exposes the lowest window that is obscured by other windows. .IP \fBf.continue\fP releases the window server display action after you stop action with the \fBf.pause\fP function. .IP \fBf.focus\fP directs all keyboard input to the selected window. To reset the focus to all windows, invoke \fIf.focus\fP from the root window. .IP \fBf.iconify\fP when implemented from a window, this function converts the window to its respective icon. When implemented from an icon, f.iconify converts the icon to its respective window. .IP \fBf.lower\fP lowers a window that is obstructing a window below it. .IP \fBf.menu\fP invokes a menu. Enclose `menu name' in quotes if it contains blank characters or parentheses. .EX 0 .B f.menu=[\fIcontrol key(s)\fP]:[\fIcontext \fP]:\fImouse events\fP:\fI" menu name "\fP .EE .IP \fBf.move\fP moves a window or icon to a new location, which becomes the default location. .IP \fBf.moveopaque\fP moves a window or icon to a new screen location. When using this function, the entire window or icon is moved to the new screen location. The grid effect is not used with this function. .IP \fBf.newiconify\fP allows you to create a window or icon and then position the window or icon in a new default location on the screen. .IP \fBf.pause\fP temporarily stops all display action. To release the screen and immediately update all windows, use the \fBf.continue\fP function. .IP \fBf.pushdown\fP moves a window down. The distance of the push is determined by the push variables. .IP \fBf.pushleft\fP moves a window to the left. The distance of the push is determined by the push variables. .IP \fBf.pushright\fP moves a window to the right. The distance of the push is determined by the push variables. .IP \fBf.pushup\fP moves a window up. The distance of the push is determined by the push variables. .IP \fBf.raise\fP raises a window that is being obstructed by a window above it. .IP \fBf.refresh\fP results in exposure events being sent to the window server clients for all unobscured or partially obscured windows. The windows will not refresh correctly if the exposure events are not handled properly. .IP \fBf.resize\fP resizes an existing window. Note that some clients, notably editors, react unpredictably if you resize the window while the client is running. .IP \fBf.restart\fP causes the window manager application to restart, retracing the \fIawm\fP search path and initializing the variables it finds. .IP \fBf.destroy\fP calls XKillClient on the selected window. Use with caution!! Binding it to naked mouse buttons is probably not a good idea! .IP \fBf.title\fP puts a title bar on the selected window. Use the \fBtitle\fP variable to put titles on all windows. This function is intended for those that don't want titles on everything, just selected windows. .IP \fBf.notitle\fP removes a titlebar from the selected window. This does not effect the setting of \fBtitle\fP. .IP \fBf.gadgets\fP Puts gadget boxes in a title. Use the \fBgadgets\fP variable to put gadgets in all titles. .IP \fBf.nogadgets\fP removes gadget boxes from a title. .PP .SH Control Keys .PP By default, the window manager uses meta as its control key. It can also use ctrl, shift, lock, or null (no control key). Control keys must be entered in lower case, and can be abbreviated as: c, l, m, s for ctrl, lock, meta, and shift, respectively. .PP You can bind one, two, or no control keys to a function. Use the bar (|) character to combine control keys. .PP .SH Context .PP The context refers to the screen location of the cursor when a command is initiated. When you include a context entry in a binding, the cursor must be in that context or the function will not be activated. The window manager recognizes the following six contexts: icon, window, root, title, gadget[\fIn\fP] (where \fIn\fP is the gadget number) and (null). .PP The root context refers to the root, or background window, A (null) context is indicated when the context field is left blank, and allows a function to be invoked from any screen location. The title context refers to the titlebar area of a window, if one exists. The gadget context (with mandatory index) specifies a given gadget box. Binding to a gadget that's undefined (not initialized to anything) is an error. Combine contexts using the bar (|) character. .PP .SH Mouse Buttons .PP Any of the following mouse buttons are accepted in lower case and can be abbreviated as l, m, or r, respectively: left, middle, right. .PP With the specific button, you must identify the action of that button. Mouse actions can be: .IP "\fBdown\fP" 10 function occurs when the specified button is pressed down. .IP \fBup\fP function occurs when the specified button is released. .IP "\fBdelta\fP" 10 indicates that the mouse must be moved the number of pixels specified with the delta variable before the specified function is invoked. The mouse can be moved in any direction to satisfy the delta requirement. .PP .SH MENU DEFINITION .PP After binding a set of function keys and a menu name to \fBf.menu\fP, you must define the menu to be invoked, using the following syntax: .EX .B \fBmenu \fP= (\fIstring\fP) " \fImenu name\fP " { "\fIitem name\fP" : "\fIaction\fP" . . . } .EE .PP The \fIstring\fP in parenthesis is an optional argument which names a pixmap file (see also: \fBBitmapDir\fP) to use as the menu title rather than just using the name of the menu. This is only generally useful if you're using pixmaps for the menu panes as well (see below). Though the \fImenu name\fP isn't displayed when you do this, you still need to specify one for awm to use when looking up the binding to it. Enter the \fImenu name\fP exactly the way it is entered with the \fBf.menu\fP function or the window manager will not recognize the link. If the \fImenu name\fP contains blank strings, tabs or parentheses, it must be quoted here and in the \fBf.menu\fP function entry. You can enter as many menu items as your screen is long. You cannot scroll within menus. .PP Any menu entry that contains quotes, special characters, parentheses, tabs, or strings of blanks must be enclosed in double quotes. Follow the item name by a colon (:). A special case is an item surrounded by parenthesis, which designates the \fIitem name\fP as the name of a pixmap file to tile the menu pane with. Given a pixmap for the title as well (see above), it's possible to create menus that are totally pictoral in nature. There is, however, one caveat. Due to the fact that it's much easier to deal with, the pixmaps are used as backgrounds for the menu panes rather than painting them on whenever a given pane in exposed. This has rather ugly consequences if one of the pixmaps (or a line of text) is larger than the others. Since the server replicates pixmaps over the entire window, it results in a "wallpaper" effect on the smaller pixmaps. The solution is to make all the pixmaps the same size and not mix in any text strings that will need a wider pane (or use a smaller menu font) Check-marks and pull-right indicators are also slapped on top of the pixmaps without much regard to their contents. Design your pictures with these problems in mind. .PP .SH Menu Action .IP "Window manager functions" 10 Any function previously described. E.g., \fBf.move\fP or \fBf.iconify\fP. Using f.menu results in a pull-right pane which you can use to "walk" between menus. A "walk" can also be selected by clicking another button in the pane while holding the original one down. .IP "Shell commands" Begin with an exclamation point (!) and set to run in background. You cannot include a new line character within a shell command. .IP "Text strings" Text strings are placed in the window server's cut buffer. .IP Strings with a new line character must begin with an up arrow (^), which is stripped during the copy operation. .IP Strings without a new line must begin with the bar character (|), which is stripped during the copy operation. .IP "Booleans" Any boolean variable previously described. E.g., \fBnohilite\fP or \fBautoraise\fP. .PP .SH Color Defaults .PP Colors default to the colors of the root window under any of the following conditions: .sp 1) If you run out of color map entries, either before or during an invocation of \fIawm\fP. .sp 2) If you specify a foreground or background color that does not exist in the RGB color database (\fI/usr/X11/lib/rgb.txt\fP) both the foreground and background colors default to the root window colors. .sp 3) If you omit a foreground or background color, both the foreground and background colors default to the root window colors. .sp 4) If the total number of colors specified in the startup file exceeds the number specified in the \fImaxcolors\fP variable. .sp 5) If you specify no colors in the startup file. .bp .SH X DEFAULTS .PP A number of variables that were previously specified in the .uwmrc file have been moved out of the .awmrc file and are now gotten from the resource database. When a value cannot be found, a default (compiled into awm) is substituted. .SH BOOLEANS .nf autoraise (boolean) automatially raise a window to the top when it gains the input focus. See also: \fBraiseDelay\fP Default is off. autoselect (boolean) specifies that the pointer be placed over the first item in a menu, rather than the title, when the menu is popped up. Default is off. gadgets (boolean) display gadgets in title bars, if any are declared. Default is off. freeze (boolean) lock out all other clients during certain window manager tasks, such as move and resize. Default is off. grid (boolean) display a finely ruled grid when positioning or resizing windows/icons. Default is off. hilite (boolean) causes the following actions to occur when a window gains the input focus: 1. Border color changes to white (or \fBreverse\fP). 2. If a \fBtitle.boldFont\fP font is defined, (and \fBshowName\fP is on) the window name is drawn in this font. 3. If \fBtitle.boldPixmap\fP is defined, the background of the title bar is set to it. On focus out, the border color reverts to grey, the window name to \fBtitle.font\fP and the title background to \fBtitle.pixmap\fP, respectively. Default is off. normali (boolean) make sure that icons created with \fBf.newiconify\fP stay wholly within the root window (on screen), regardless of attempted placement. If off, put icons wherever the cursor is placed. Default is on. normalw (boolean) make sure that windows mapped with \fBf.newiconify\fP are placed on-screen, regardless of cursor position. If off, put windows wherever the cursor is placed. Default is on. pushRelative (boolean) When a window is pushed, push 1/\fBpush\fP of the window. If off, move window \fBpush\fP pixels. Default is off. reverse (boolean) reverse background/foreground colors for titles, menus, gadget windows, popup windows, etc. In the absence of any color specifications, this results in black-on-white. Default is off. rootResizeBox (boolean) put the resize (popup) window in the upper left corner of the root window, rather than on the window being resized. This saves a potentially expensive refresh that would occur when the popup was unmapped. If your server supports save-unders, it's generally (but not always) better to turn \fBsaveUnder\fP on instead. Default is off. saveUnder (boolean) use save-unders for menus and pop-up windows. If the server does not support save-unders, this action does nothing. Default is off. showName (boolean) display the window name in a title (assuming that the window is titled in the first place). Default is on. titles (boolean) put title bars on all windows (both existing windows and new ones as they're created. See also: \fBf.title\fP Default is off. warpOnDeIconify (boolean) warp pointer to upper left corner of window on de-iconify. Default is off. warpOnIconify (boolean) warp pointer to center of icon on iconify. Default is off. warpOnRaise (boolean) warp pointer to upper left corner of window on raise. Default is off. zap (boolean) causes ghost lines to follow the window or icon from its previous location to its new location during a move, resize or iconify operation. Default is off. .SH NUMERIC .nf delta (int) number of pixels that must be moved over before a "delta" action is taken (see: \fBBINDING SYNTAX\fP). Default is 1. gadget.pad (int) the number of pixels to pad a gadget from its neighbor if it has no offset defined. Default is 3. hIconPad (int) number of pixels to pad icon text horizontally. Default is 2. icon.borderWidth (int) width of icon border in pixels. Default is 2. maxColors (int) don't allow window manager to eat any more than this many colors. Default is 0 (as many colors as it wants). menu.borderWidth (int) width of menu border in pixels. Default is 2. menu.delta (int) number of pixels to move on a "pull-right" pane before the submenu attached to it is popped up. Default is 20. menu.itemBorder (int) width of individual (menu) item borders. Default is 1. menu.pad (int) number of pixels to pad menu text/pixmaps vertically. Default is 2. popup.borderWidth (int) width of pop-up window border in pixels. Default is 2. popup.pad (int) number of pixels to pad pop-up text horizontally. Default is 4. raiseDelay (int) amount of time in milliseconds to wait (while window has focus) before raising. If pointer leaves window before time elapses, raise is not performed. Default is 100 milliseconds. vIconPad (int) number of pixels to pad icon text vertically. Default is 2. volume (int) specifies the bell volume (delta on volume set with xset). Default is 4. .SH STRING .nf gadget.font (string) which font to use for (textual) gadget labels. Default is fixed. \fBNote that all icon variables only affect icons owned by awm. Client created icons are left alone.\fP icon.background (string) icon (pixmap) background color. Default is white (or \fBreverse\fP). icon.border (string) color to use for icon borders. Default is \fBicon.foreground\fP. icon.foreground (string) icon (pixmap) foreground color. Default is black (or \fBreverse\fP). icon.font (string) which font to use for icon text. Default is 8x13 icon.text.background (string) background color to use for icon text. icon.text.foreground (string) foreground color to use for icon text. icon.pixmap (string) pixmap to display as icon background. Since this pixmap will be used to tile all icons owned by uwm, it's probably not a good idea to put application specific pictures in it. More typically, this will be a cross hatch pattern or some similar background weave. Default is grey. See also: \fBpixmapDir\fP, \fBicon.foreground\fP, \fBicon.background\fP. menu.background (string) menu background color. Default is white (or \fBreverse\fP). menu.foreground (string) menu foreground color. Default is black (or \fBreverse\fP). menu.boldFont (string) which font to use for (textual) menu panes. Currently, the only pane using this font is the title pane (assuming that it's not a pixmap). Default is 8x13bold menu.font (string) which font to use in (textual) menu panes. Default is 8x13. pixmapDir (string) A number of items (titles, menus, etc) now allow you to specify a pixmap file, rather than just a text string to display. Since it would be tedious to type in full pathnames for these files if they all lived in the same place, the directory named by \fBpixmapDir\fP is searched if the pixmap file's pathname does not begin with a slash (/). \fBpixmapDir\fP can be a full pathname or "~/...". ~user is not supported, nor is it possible to specify more than one directory to search. These limitations will be eliminated in the near future. popup.background (string) background color to use for pop-up text. Default is white (or \fBreverse\fP). popup.font (string) which font to use for popup window text. Default is 9x15 popup.foreground (string) foreground color to use for pop-ip text. Default is black (or \fBreverse\fP). title.background (string) same as above, except background. Default is white (or \fBreverse\fP). title.boldFont (string) which font to use for titlebar labels when focus is in. Note that only titleFont is used if \fBhilite\fP is off. Defining this without enabling highlighting is a noop. Default is vtbold. title.boldPixmap (string) the name of a pixmap file to load and tile titlebars with when the focus is in. If this is defined, and \fBhilite\fP is set, focus changes will cause title backgrounds to alternate between \fBtitleBackground\fP and \fBtitleBoldBackground\fP. If \fBtitleBoldBackground\fP is defined, but \fBtitleBackground\fP is not, a blank pixmap will be used in place of \fBtitleBackground\fP. Defining this without enabling highlighting is a noop. Default is none. title.font (string) which font to use for titlebar labels (when focus is out). Default is vtsingle. title.foreground (string) foreground color to use when drawing background (both normal and bold) pixmaps. Default is black (or \fBreverse\fP). title.pixmap (string) the name of a pixmap file to load and tile titlebars with. This background is use exclusively unless the \fBtitleBoldBackground\fP is defined and \fBhilite\fP is set. Default is none. title.text.background (string) background color to use when drawing title bar text. title.text.foreground (string) foreground color to use when drawing title bar. .fi .bp .SH EXAMPLES .PP The following sample startup file shows the default window manager options: .EX # Global variables # resetbindings resetmenus # # Mouse button/key maps # # FUNCTION KEYS CONTEXT BUTTON MENU(if any) # ======== ==== ======= ====== ============ f.menu = meta : :left down :"WINDOW OPS" f.menu = meta : :middle down :"EXTENDED WINDOW OPS" f.move = meta :w|i :right down f.circleup = meta :root :right down # # Menu specifications # menu = "WINDOW OPS" { "(De)Iconify": f.iconify Move: f.move Resize: f.resize Lower: f.lower Raise: f.raise } menu = "EXTENDED WINDOW OPS" { Create Window: !"xterm &" Iconify at New Position: f.lowericonify Focus Keyboard on Window: f.focus Freeze All Windows: f.pause Unfreeze All Windows: f.continue Circulate Windows Up: f.circleup Circulate Windows Down: f.circledown } .EE .PP .SH RESTRICTIONS .PP The color specifications have no effect on a monochrome system. Bindings to window or icon (but not title, gadget or root) contexts will result in the key/button chord being usurped for *all* other contexts. This is because of the way passive grabs are being done. The (current) author will eliminate this restriction if he ever figures out a way. Suggestions are welcome. It is suggested that users bind the more complicated chords to windows and icons and use simple (even naked) bindings on the root/gadget/title windows. .PP .SH FILES .PP /usr/X11/lib/rgb.txt /usr/X11/lib/font /usr/skel/.awmrc /usr/X11/lib/awm/system.awmrc $HOME/.awmrc .PP .SH SEE ALSO .PP X(1), X(8C) .SH AUTHOR .PP .ce 3 COPYRIGHT 1985, 1986 DIGITAL EQUIPMENT CORPORATION MAYNARD, MASSACHUSETTS ALL RIGHTS RESERVED. .LP THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITIBILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. .LP IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS, APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT SET FORTH ABOVE. .LP Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital Equipment Corporation not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. .PP .ce 2 Copyright 1988 by Ardent Computer Corporation, Sunnyvale, Ca .LP .nf All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Ardent Computer Corporation or the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. .fi .PP M. Gancarz, DEC Ultrix Engineering Group, Merrimack, New Hampshire, using some algorithms originally by Bob Scheifler, MIT Laboratory for Computer Science .PP J. Hubbard, U.C. Berkeley, Berkeley, Ca. Ardent Computer, Sunnyvale, Ca. Various modifications and enhancements using code developed by M. Gancarz and Digitial Equipment Corp.