[0m


TWM(1)		    UNIX Programmer's Manual		   TWM(1)



[1mNAME
     [0mtwm - Tab Window Manager for the X Window System

[1mSYNTAX
     twm [0m[-display _d_p_y] [-s] [-f _i_n_i_t_f_i_l_e] [-v]

[1mDESCRIPTION
     [0m_T_w_m is a window manager for the X Window System.  It pro-
     vides titlebars, shaped windows, several forms of icon
     management, user-defined macro functions, click-to-type and
     pointer-driven keyboard focus, and user-specified key and
     pointer button bindings.

     This program is usually started by the user's session
     manager or startup script.  When used from _x_d_m(_1) or
     _x_i_n_i_t(_1) without a session manager, _t_w_m is frequently exe-
     cuted in the foreground as the last client.  When run this
     way, exiting _t_w_m causes the session to be terminated (i.e.
     logged out).

     By default, application windows are surrounded by a
     ``frame'' with a titlebar at the top and a special border
     around the window.  The titlebar contains the window's name,
     a rectangle that is lit when the window is receiving key-
     board input, and function boxes known as ``titlebuttons'' at
     the left and right edges of the titlebar.

     Pressing pointer Button1 (usually the left-most button
     unless it has been changed with _x_m_o_d_m_a_p) on a titlebutton
     will invoke the function associated with the button.  In the
     default interface, windows are iconified by clicking (press-
     ing and then immediately releasing) the left titlebutton
     (which looks like a small X).  Conversely, windows are
     deiconified by clicking in the associated icon or entry in
     the icon manager (see description of the variable [1mShowIcon-
     Manager [0mand of the function [1mf.showiconmgr[0m).

     Windows are resized by pressing the right titlebutton (which
     resembles group of nested squares), dragging the pointer
     over edge that is to be moved, and releasing the pointer
     when the outline of the window is the desired size.  Simi-
     larly, windows are moved by pressing in the title or
     highlight region, dragging a window outline to the new loca-
     tion, and then releasing when the outline is in the desired
     position.	Just clicking in the title or highlight region
     raises the window without moving it.

     When new windows are created, _t_w_m will honor any size and
     location information requested by the user (usually through
     -_g_e_o_m_e_t_r_y command line argument or resources for the indivi-
     dual applications). Otherwise, an outline of the window's
     default size, its titlebar, and lines dividing the window



Printed 25/11/91	    Release 4				1






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     into a 3x3 grid that track the pointer are displayed.
     Clicking pointer Button1 will position the window at the
     current position and give it the default size.  Pressing
     pointer Button2 (usually the middle pointer button) and
     dragging the outline will give the window its current posi-
     tion but allow the sides to be resized as described above.
     Clicking pointer Button3 (usually the right pointer button)
     will give the window its current position but attempt to
     make it long enough to touch the bottom the screen.

[1mOPTIONS
     [0m_T_w_m accepts the following command line options:

     [1m-display [0m_d_p_y
	     This option specifies the X server to use.

     [1m-s      [0mThis option indicates that only the default screen
	     (as specified by [1m-display [0mor by the [1mDISPLAY [0menviron-
	     ment variable) should be managed.	By default, _t_w_m
	     will attempt to manage all screens on the display.

     [1m-f [0m_f_i_l_e_n_a_m_e
	     This option specifies the name of the startup file
	     to use.  By default, _t_w_m will look in the user's
	     home directory for files named ._t_w_m_r_c._n_u_m (where _n_u_m
	     is a screen number) or ._t_w_m_r_c.

     [1m-v      [0mThis option indicates that _t_w_m should print error
	     messages whenever an unexpected X Error event is
	     received.	This can be useful when debugging appli-
	     cations but can be distracting in regular use.

[1mCUSTOMIZATION
     [0mMuch of _t_w_m's appearance and behavior can be controlled by
     providing a startup file in one of the following locations
     (searched in order for each screen being managed when _t_w_m
     begins):

     [1m$HOME/.twmrc.[0m_s_c_r_e_e_n_n_u_m_b_e_r
	     The _s_c_r_e_e_n_n_u_m_b_e_r is a small positive number (e.g. 0,
	     1, etc.) representing the screen number (e.g. the
	     last number in the DISPLAY environment variable
	     _h_o_s_t:_d_i_s_p_l_a_y_n_u_m._s_c_r_e_e_n_n_u_m) that would be used to
	     contact that screen of the display.  This is
	     intended for displays with multiple screens of
	     differing visual types.

     [1m$HOME/.twmrc
	     [0mThis is the usual name for an individual user's
	     startup file.

     [1m/usr/lib/X11/twm/system.twmrc



[0mPrinted 25/11/91	    Release 4				2






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     If neither of the preceding files are found, _t_w_m
	     will look in this file for a default configuration.
	     This is often tailored by the site administrator to
	     provide convenient menus or familiar bindings for
	     novice users.

     If no startup files are found, _t_w_m will use the built-in
     defaults described above.	The only resource used by _t_w_m is
     _b_i_t_m_a_p_F_i_l_e_P_a_t_h for a colon-separated list of directories to
     search when looking for bitmap files (for more information,
     see the _A_t_h_e_n_a _W_i_d_g_e_t_s manual and _x_r_d_b(_1)).

     _T_w_m startup files are logically broken up into three types
     of specifications:  _V_a_r_i_a_b_l_e_s, _B_i_n_d_i_n_g_s, _M_e_n_u_s.  The _V_a_r_i_-
     _a_b_l_e_s section must come first and is used to describe the
     fonts, colors, cursors, border widths, icon and window
     placement, highlighting, autoraising, layout of titles,
     warping, use of the icon manager.	The _B_i_n_d_i_n_g_s section usu-
     ally comes second and is used to specify the functions that
     should be to be invoked when keyboard and pointer buttons
     are pressed in windows, icons, titles, and frames.  The
     _M_e_n_u_s section gives any user-defined menus (containing func-
     tions to be invoked or commands to be executed).

     Variable names and keywords are case-insensitive.	Strings
     must be surrounded by double quote characters (e.g. "blue")
     and are case-sensitive.  A pound sign (#) outside of a
     string causes the remainder of the line in which the charac-
     ter appears to be treated as a comment.

[1mVARIABLES
     [0mMany of the aspects of _t_w_m's user interface are controlled
     by variables that may be set in the user's startup file.
     Some of the options are enabled or disabled simply by the
     presence of a particular keyword.	Other options require
     keywords, numbers, strings, or lists of all of these.

     Lists are surrounded by braces and are usually separated by
     whitespace or a newline.  For example:

	  [1mAutoRaise [0m{ "emacs" "XTerm" "Xmh" }

     or

	  [1mAutoRaise
	  [0m{
	       "emacs"
	       "XTerm"
	       "Xmh"
	  }

     When a variable containing a list of strings representing



Printed 25/11/91	    Release 4				3






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     windows is searched (e.g. to determine whether or not to
     enable autoraise as shown above), a string is considered to
     match a window if it is a case-sensitive prefix for the
     window's name name (given by the WM_NAME window property),
     resource name or class name (both given by the WM_CLASS win-
     dow property).  The preceding example would enable autoraise
     on windows named ``emacs'' as well as any _x_t_e_r_m (since they
     are of class ``XTerm'') or xmh windows (which are of class
     ``Xmh'').

     String arguments that are interpreted as filenames (see the
     [1mPixmaps[0m, [1mCursors[0m, and [1mIconDirectory [0mbelow) will prepend the
     user's directory (specified by the [1mHOME [0menvironment vari-
     able) if the first character is a tilde (~).  If, instead,
     the first character is a colon (:), the name is assumed to
     refer to one of the internal bitmaps that are used to create
     the default titlebars symbols:  [1m:xlogo [0mor [1m:iconify [0m(both
     refer to the X used for the iconify button), [1m:resize [0m(the
     nested squares used by the resize button), and [1m:question
     [0m(the question mark used for non-existent bitmap files).

     The following variables may be specified at the top of a _t_w_m
     startup file.  Lists of Window name prefix strings are indi-
     cated by _w_i_n-_l_i_s_t.  Optional arguments are shown in square
     brackets:

     [1mAutoRaise [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of windows that
	     should automatically be raised whenever the pointer
	     enters the window.  This action can be interactively
	     enabled or disabled on individual windows using the
	     function [1mf.autoraise[0m.

     [1mAutoRelativeResize
	     [0mThis variable indicates that dragging out a window
	     size (either when initially sizing the window with
	     pointer Button2 or when resizing it) should not wait
	     until the pointer has crossed the window edges.
	     Instead, moving the pointer automatically causes the
	     nearest edge or edges to move by the same amount.
	     This allows allows the resizing windows that extend
	     off the edge of the screen.  If the pointer is in
	     the center of the window, or if the resize is begun
	     by pressing a titlebutton, _t_w_m will still wait for
	     the pointer to cross a window edge (to prevent
	     accidents).  This option is particularly useful for
	     people who like the press-drag-release method of
	     sweeping out window sizes.

     [1mBorderColor [0m_s_t_r_i_n_g [{ _w_i_n_c_o_l_o_r_l_i_s_t }]
	     This variable specifies the default color of the
	     border to be placed around all non-iconified



Printed 25/11/91	    Release 4				4






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     windows, and may only be given within a [1mColor [0mor
	     [1mMonochrome [0mlist.  The optional _w_i_n_c_o_l_o_r_l_i_s_t speci-
	     fies a list of window and color name pairs for
	     specifying particular border colors for different
	     types of windows.	For example:

		  [1mBorderColor [0m"gray50"
		  {
		       "XTerm"	 "red"
		       "xmh"	 "green"
		  }

	     The default is "black".

     [1mBorderTileBackground [0m_s_t_r_i_n_g [{ _w_i_n_c_o_l_o_r_l_i_s_t }]
	     This variable specifies the default background color
	     in the gray pattern used in unhighlighted borders
	     (only if [1mNoHighlight [0mhasn't been set), and may only
	     be given within a [1mColor [0mor [1mMonochrome [0mlist.  The
	     optional _w_i_n_c_o_l_o_r_l_i_s_t allows per-window colors to be
	     specified.  The default  is "black".

     [1mBorderTileForeground [0m_s_t_r_i_n_g [{ _w_i_n_c_o_l_o_r_l_i_s_t }]
	     This variable specifies the default foreground color
	     in the gray pattern used in unhighlighted borders
	     (only if [1mNoHighlight [0mhasn't been set), and may only
	     be given within a [1mColor [0mor [1mMonochrome [0mlist.  The
	     optional _w_i_n_c_o_l_o_r_l_i_s_t allows per-window colors to be
	     specified.  The default is "white".

     [1mBorderWidth [0m_p_i_x_e_l_s
	     This variable specifies the width in pixels of the
	     border surrounding all client window frames if
	     [1mClientBorderWidth [0mhas not been specified.	This
	     value is also used to set the border size of windows
	     created by _t_w_m (such as the icon manager).  The
	     default is 2.

     [1mButtonIndent [0m_p_i_x_e_l_s
	     This variable specifies the amount by which
	     titlebuttons should be indented on all sides.  Posi-
	     tive values cause the buttons to be smaller than the
	     window text and highlight area so that they stand
	     out.  Setting this and the [1mTitleButtonBorderWidth
	     [0mvariables to 0 makes titlebuttons be as tall and
	     wide as possible.	The default is 1.

     [1mClientBorderWidth
	     [0mThis variable indicates that border width of a
	     window's frame should be set to the initial border
	     width of the window, rather than to the value of
	     [1mBorderWidth[0m.



Printed 25/11/91	    Release 4				5






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mColor [0m{ _c_o_l_o_r_s-_l_i_s_t }
	     This variable specifies a list of color assignments
	     to be made if the default display is capable of
	     displaying more than simple black and white.  The
	     _c_o_l_o_r_s-_l_i_s_t is made up of the following color vari-
	     ables and their values: [1mDefaultBackground[0m, [1mDefault-
	     Foreground[0m, [1mMenuBackground[0m, [1mMenuForeground[0m, [1mMenu-
	     TitleBackground[0m, [1mMenuTitleForeground[0m, and [1mMenuSha-
	     dowColor[0m.	The following color variables may also be
	     given a list of window and color name pairs to allow
	     per-window colors to be specified (see [1mBorderColor
	     [0mfor details): [1mBorderColor[0m, [1mIconManagerHighlight[0m,
	     [1mBorderTitleBackground[0m, [1mBorderTitleForeground[0m,
	     [1mTitleBackground[0m, [1mTitleForeground[0m, [1mIconBackground[0m,
	     [1mIconForeground[0m, [1mIconBorderColor[0m, [1mIconManagerBack-
	     ground[0m, and [1mIconManagerForeground[0m.  For example:

		  [1mColor
		  [0m{
		       MenuBackground	   "gray50"
		       MenuForeground	   "blue"
		       BorderColor		"red" { "XTerm" "yellow" }
		       TitleForeground		"yellow"
		       TitleBackground		"blue"
		  }

	     All of these color variables may also be specified
	     for the [1mMonochrome [0mvariable, allowing the same ini-
	     tialization file to be used on both color and mono-
	     chrome displays.

     [1mConstrainedMoveTime [0m_m_i_l_l_i_s_e_c_o_n_d_s
	     This variable specifies the length of time between
	     button clicks needed to begin a constrained move
	     operation.  Double clicking within this amount of
	     time when invoking [1mf.move [0mwill cause the window only
	     be moved in a horizontal or vertical direction.
	     Setting this value to 0 will disable constrained
	     moves.  The default is 400 milliseconds.

     [1mCursors [0m{ _c_u_r_s_o_r-_l_i_s_t }
	     This variable specifies the glyphs that _t_w_m should
	     use for various pointer cursors.  Each cursor may be
	     defined either from the [1mcursor [0mfont or from two bit-
	     map files.  Shapes from the [1mcursor [0mfont may be
	     specified directly as:

		       _c_u_r_s_o_r_n_a_m_e     "_s_t_r_i_n_g"

	     where _c_u_r_s_o_r_n_a_m_e is one of the cursor names listed
	     below, and _s_t_r_i_n_g is the name of a glyph as found in
	     the file /usr/include/X11/cursorfont.h (without the



Printed 25/11/91	    Release 4				6






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     ``XC_'' prefix).  If the cursor is to be defined
	     from bitmap files, the following syntax is used
	     instead:

		       _c_u_r_s_o_r_n_a_m_e     "_i_m_a_g_e"	"_m_a_s_k"

	     The _i_m_a_g_e and _m_a_s_k strings specify the names of
	     files containing the glyph image and mask in _b_i_t_-
	     _m_a_p(_1) form.  The bitmap files are located in the
	     same manner as icon bitmap files.	The following
	     example shows the default cursor definitions:

		  [1mCursors
		  [0m{
		       Frame	      "top_left_arrow"
		       Title	      "top_left_arrow"
		       Icon	 "top_left_arrow"
		       IconMgr	 "top_left_arrow"
		       Move	 "fleur"
		       Resize	      "fleur"
		       Menu	 "sb_left_arrow"
		       Button	      "hand2"
		       Wait	 "watch"
		       Select	      "dot"
		       Destroy	 "pirate"
		  }


     [1mDecorateTransients
	     [0mThis variable indicates that transient windows
	     (those containing a WM_TRANSIENT_FOR property)
	     should have titlebars.  By default, transients are
	     not reparented.

     [1mDefaultBackground [0m_s_t_r_i_n_g
	     This variable specifies the background color to be
	     used for sizing and information windows.  The
	     default is "white".

     [1mDefaultForeground [0m_s_t_r_i_n_g
	     This variable specifies the foreground color to be
	     used for sizing and information windows.  The
	     default is "black".

     [1mDontIconifyByUnmapping [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of windows that
	     should not be iconified by simply unmapping the win-
	     dow (as would be the case if [1mIconifyByUnmapping [0mhad
	     been set).  This is frequently used to force some
	     windows to be treated as icons while other windows
	     are handled by the icon manager.




Printed 25/11/91	    Release 4				7






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mDontMoveOff
	     [0mThis variable indicates that windows should not be
	     allowed to be moved off the screen.  It can be over-
	     ridden by the [1mf.forcemove [0mfunction.

     [1mDontSqueezeTitle [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that titlebars should not be
	     squeezed to their minimum size as described under
	     [1mSqueezeTitle [0mbelow.  If the optional window list is
	     supplied, only those windows will be prevented from
	     being squeezed.

     [1mForceIcons
	     [0mThis variable indicates that icon pixmaps specified
	     in the [1mIcons [0mvariable should override any client-
	     supplied pixmaps.

     [1mFramePadding [0m_p_i_x_e_l_s
	     This variable specifies the distance between the
	     titlebar decorations (the button and text) and the
	     window frame.  The default is 2 pixels.

     [1mIconBackground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the background color of
	     icons, and may only be specified inside of a [1mColor
	     [0mor [1mMonochrome [0mlist.  The optional _w_i_n-_l_i_s_t is a list
	     of window names and colors so that per-window colors
	     may be specified.	See the [1mBorderColor [0mvariable for
	     a complete description of the _w_i_n-_l_i_s_t.  The default
	     is "white".

     [1mIconBorderColor [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the color of the border used
	     for icon windows, and may only be specified inside
	     of a [1mColor [0mor [1mMonochrome [0mlist.  The optional _w_i_n-
	     _l_i_s_t is a list of window names and colors so that
	     per-window colors may be specified.  See the [1mBorder-
	     Color [0mvariable for a complete description of the
	     _w_i_n-_l_i_s_t. The default is "black".

     [1mIconBorderWidth [0m_p_i_x_e_l_s
	     This variable specifies the width in pixels of the
	     border surrounding icon windows.  The default is 2.

     [1mIconDirectory [0m_s_t_r_i_n_g
	     This variable specifies the directory that should be
	     searched if if a bitmap file cannot be found in any
	     of the directories in the [1mbitmapFilePath [0mresource.

     [1mIconFont [0m_s_t_r_i_n_g
	     This variable specifies the font to be used to
	     display icon names within icons.  The default is



Printed 25/11/91	    Release 4				8






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     "8x13".

     [1mIconForeground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the foreground color to be
	     used when displaying icons, and may only be speci-
	     fied inside of a [1mColor [0mor [1mMonochrome [0mlist.  The
	     optional _w_i_n-_l_i_s_t is a list of window names and
	     colors so that per-window colors may be specified.
	     See the [1mBorderColor [0mvariable for a complete descrip-
	     tion of the _w_i_n-_l_i_s_t.  The default is "black".

     [1mIconifyByUnmapping [{ [0m_w_i_n-_l_i_s_t [1m}]
	     [0mThis variable indicates that windows should be icon-
	     ified by being unmapped without trying to map any
	     icons.  This assumes that the user is will remap the
	     window through the icon manager, the [1mf.warpto [0mfunc-
	     tion, or the _T_w_m_W_i_n_d_o_w_s menu.  If the optional _w_i_n-
	     _l_i_s_t is provided, only those windows will be iconi-
	     fied by simply unmapping.	Windows that have both
	     this and the [1mIconManagerDontShow [0moptions set may not
	     be accessible if no binding to the _T_w_m_W_i_n_d_o_w_s menu
	     is set in the user's startup file.

     [1mIconManagerBackground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the background color to use
	     for icon manager entries, and may only be specified
	     inside of a [1mColor [0mor [1mMonochrome [0mlist.  The optional
	     _w_i_n-_l_i_s_t is a list of window names and colors so
	     that per-window colors may be specified.  See the
	     [1mBorderColor [0mvariable for a complete description of
	     the _w_i_n-_l_i_s_t.  The default is "white".

     [1mIconManagerDontShow [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that the icon manager should
	     not display any windows.  If the optional _w_i_n-_l_i_s_t
	     is given, only those windows will not be displayed.
	     This variable is used to prevent windows that are
	     rarely iconified (such as _x_c_l_o_c_k or _x_l_o_a_d) from tak-
	     ing up space in the icon manager.

     [1mIconManagerFont [0m_s_t_r_i_n_g
	     This variable specifies the font to be used when
	     displaying icon manager entries.  The default is
	     "8x13".

     [1mIconManagerForeground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the foreground color to be
	     used when displaying icon manager entries, and may
	     only be specified inside of a [1mColor [0mor [1mMonochrome
	     [0mlist.  The optional _w_i_n-_l_i_s_t is a list of window
	     names and colors so that per-window colors may be
	     specified.  See the [1mBorderColor [0mvariable for a



Printed 25/11/91	    Release 4				9






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     complete description of the _w_i_n-_l_i_s_t.  The default
	     is "black".

     [1mIconManagerGeometry [0m_s_t_r_i_n_g [ _c_o_l_u_m_n_s ]
	     This variable specifies the geometry of the icon
	     manager window.  The _s_t_r_i_n_g argument is standard
	     geometry specification that indicates the initial
	     full size of the icon manager.  The icon manager
	     window is then broken into _c_o_l_u_m_n_s pieces and scaled
	     according to the number of entries in the icon
	     manager.  Extra entries are wrapped to form addi-
	     tional rows.  The default number of columns is 1.

     [1mIconManagerHighlight [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the border color to be used
	     when highlighting the icon manager entry that
	     currently has the focus, and can only be specified
	     inside of a [1mColor [0mor [1mMonochrome [0mlist.  The optional
	     _w_i_n-_l_i_s_t is a list of window names and colors so
	     that per-window colors may be specified.  See the
	     [1mBorderColor [0mvariable for a complete description of
	     the _w_i_n-_l_i_s_t.  The default is "black".

     [1mIconManagers [0m{ _i_c_o_n_m_g_r-_l_i_s_t }
	     This variable specifies a list of icon managers to
	     create.  Each item in the _i_c_o_n_m_g_r-_l_i_s_t has the fol-
	     lowing format:

		       "_w_i_n_n_a_m_e" ["_i_c_o_n_n_a_m_e"]	"_g_e_o_m_e_t_r_y" _c_o_l_u_m_n_s

	     where _w_i_n_n_a_m_e is the name of the windows that should
	     be put into this icon manager, _i_c_o_n_n_a_m_e is the name
	     of that icon manager window's icon, _g_e_o_m_e_t_r_y is a
	     standard geometry specification, and _c_o_l_u_m_n_s is the
	     number of columns in this icon manager as described
	     in [1mIconManagerGeometry[0m.  For example:

		  [1mIconManagers
		  [0m{
		       "XTerm"	 "=300x5+800+5" 5
		       "myhost"  "=400x5+100+5" 2
		  }

	     Clients whose name or class is ``XTerm'' will have
	     an entry created in the ``XTerm'' icon manager.
	     Clients whose name was ``myhost'' would be put into
	     the ``myhost'' icon manager.

     [1mIconManagerShow [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of windows that
	     should appear in the icon manager.  When used in
	     conjunction with the [1mIconManagerDontShow [0mvariable,



Printed 25/11/91	    Release 4			       10






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     only the windows in this list will be shown in the
	     icon manager.

     [1mIconRegion [0m_g_e_o_m_s_t_r_i_n_g _v_g_r_a_v _h_g_r_a_v _g_r_i_d_w_i_d_t_h _g_r_i_d_h_e_i_g_h_t
	     This variable specifies an area on the root window
	     in which icons are placed if no specific icon loca-
	     tion is provided by the client.  The _g_e_o_m_s_t_r_i_n_g is a
	     quoted string containing a standard geometry specif-
	     ication.  If more than one [1mIconRegion [0mlines are
	     given, icons will be put into the succeeding icon
	     regions when the first is full.  The _v_g_r_a_v argument
	     should be either [1mNorth [0mor [1mSouth [0mand control and is
	     used to control whether icons are first filled in
	     from the top or bottom of the icon region.  Simi-
	     larly, the _h_g_r_a_v argument should be either [1mEast [0mor
	     [1mWest [0mand is used to control whether icons should be
	     filled in from left from the right.  Icons are laid
	     out within the region in a grid with cells _g_r_i_d_w_i_d_t_h
	     pixels wide and _g_r_i_d_h_e_i_g_h_t pixels high.

     [1mIcons [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of window names and
	     the bitmap filenames that should be used as their
	     icons.  For example:

		  [1mIcons
		  [0m{
		       "XTerm"	 "xterm.icon"
		       "xfd"	      "xfd_icon"
		  }

	     Windows that match ``XTerm'' and would not be iconi-
	     fied by unmapping, and would try to use the icon
	     bitmap in the file ``xterm.icon''.  If [1mForceIcons [0mis
	     specified, this bitmap will be used even if the
	     client has requested its own icon pixmap.

     [1mInterpolateMenuColors
	     [0mThis variable indicates that menu entry colors
	     should be interpolated between entry specified
	     colors.  In the example below:

		  [1mMenu [0m"mymenu"
		  {
		       "Title"	      ("black":"red")	       f.title
		       "entry1"                 f.nop
		       "entry2"                 f.nop
		       "entry3"  ("white":"green")   f.nop
		       "entry4"                 f.nop
		       "entry5"  ("red":"white")	  f.nop
		  }




Printed 25/11/91	    Release 4			       11






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     the foreground colors for ``entry1'' and ``entry2''
	     will be interpolated between black and white, and
	     the background colors between red and green.  Simi-
	     larly, the foreground for ``entry4'' will be half-
	     way between white and red, and the background will
	     be half-way between green and white.

     [1mMakeTitle [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of windows on which a
	     titlebar should be placed and is used to request
	     titles on specific windows when [1mNoTitle [0mhas been
	     set.

     [1mMaxWindowSize [0m_s_t_r_i_n_g
	     This variable specifies a geometry in which the
	     width and height give the maximum size for a given
	     window.  This is typically used to restrict windows
	     to the size of the screen.  The default is
	     "30000x30000".

     [1mMenuBackground [0m_s_t_r_i_n_g
	     This variable specifies the background color used
	     for menus, and can only be specified inside of a
	     [1mColor [0mor [1mMonochrome [0mlist.	The default is "white".

     [1mMenuFont [0m_s_t_r_i_n_g
	     This variable specifies the font to use when
	     displaying menus.	The default is "8x13".

     [1mMenuForeground [0m_s_t_r_i_n_g
	     This variable specifies the foreground color used
	     for menus, and can only be specified inside of a
	     [1mColor [0mor [1mMonochrome [0mlist.	The default is "black".

     [1mMenuShadowColor [0m_s_t_r_i_n_g
	     This variable specifies the color of the shadow
	     behind pull-down menus and can only be specified
	     inside of a [1mColor [0mor [1mMonochrome [0mlist.  The default
	     is "black".

     [1mMenuTitleBackground [0m_s_t_r_i_n_g
	     This variable specifies the background color for
	     [1mf.title [0mentries in menus, and can only be specified
	     inside of a [1mColor [0mor [1mMonochrome [0mlist.  The default
	     is "white".

     [1mMenuTitleForeground [0m_s_t_r_i_n_g
	     This variable specifies the foreground color for
	     [1mf.title [0mentries in menus and can only be specified
	     inside of a [1mColor [0mor [1mMonochrome [0mlist.  The default
	     is "black".




Printed 25/11/91	    Release 4			       12






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mMonochrome [0m{ _c_o_l_o_r_s }
	     This variable specifies a list of color assignments
	     that should be made if the screen has a depth of 1.
	     See the description of [1mColors[0m.

     [1mMoveDelta [0m_p_i_x_e_l_s
	     This variable specifies the number of pixels the
	     pointer must move before the [1mf.move [0mfunction starts
	     working.  Also see the [1mf.deltastop [0mfunction.  The
	     default is zero pixels.

     [1mNoBackingStore
	     [0mThis variable indicates that _t_w_m's menus should not
	     request backing store to minimize repainting of
	     menus.  This is typically used with servers that can
	     repaint faster than they can handle backing store.

     [1mNoCaseSensitive
	     [0mThis variable indicates that case should be ignored
	     when sorting icon names in an icon manager.  This
	     option is typically used with applications that cap-
	     italize the first letter of their icon name.

     [1mNoDefaults
	     [0mThis variable indicates that _t_w_m should not supply
	     the default titlebuttons and bindings.  This option
	     should only be used if the startup file contains a
	     completely new set of bindings and definitions.

     [1mNoGrabServer
	     [0mThis variable indicates that _t_w_m should not grab the
	     server when popping up menus and moving opaque win-
	     dows.

     [1mNoHighlight [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that borders should not be
	     highlighted to track the location of the pointer.
	     If the optional _w_i_n-_l_i_s_t is given, highlighting will
	     only be disabled for those windows.  When the border
	     is highlighted, it will be drawn in the current [1mBor-
	     derColor[0m.	When the border is not highlighted, it
	     will be stippled with an gray pattern using the
	     current [1mBorderTileForeground [0mand [1mBorderTileBack-
	     ground [0mcolors.

     [1mNoIconManagers
	     [0mThis variable indicates that no icon manager should
	     be created.

     [1mNoMenuShadows
	     [0mThis variable indicates that menus should not have
	     drop shadows drawn behind them.  This is typically



Printed 25/11/91	    Release 4			       13






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     used with slower servers since it speeds up menu
	     drawing at the expense of making the menu slightly
	     harder to read.

     [1mNoRaiseOnDeiconify
	     [0mThis variable indicates that windows that are
	     deiconified should not be raised.

     [1mNoRaiseOnMove
	     [0mThis variable indicates that windows should not be
	     raised when moved.  This is typically used to allow
	     windows to slide underneath each other.

     [1mNoRaiseOnResize
	     [0mThis variable indicates that windows should not be
	     raised when resized.  This is typically used to
	     allow windows to be resized underneath each other.

     [1mNoRaiseOnWarp
	     [0mThis variable indicates that windows should not be
	     raised when the pointer is warped into them with the
	     [1mf.warpto [0mfunction.  If this option is set, warping
	     to an occluded window may result in the pointer end-
	     ing up in the occluding window instead the desired
	     window (which causes unexpected behavior with
	     [1mf.warpring[0m).

     [1mNoSaveUnders
	     [0mThis variable indicates that menus should not
	     request save-unders to minimize window repainting
	     following menu selection.	It is typically used with
	     displays that can repaint faster than they can han-
	     dle save-unders.

     [1mNoStackMode [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that client window requests
	     to change stacking order should be ignored.  If the
	     optional _w_i_n-_l_i_s_t is given, only requests on those
	     windows will be ignored.  This is typically used to
	     prevent applications from relentlessly popping them-
	     selves to the front of the window stack.

     [1mNoTitle [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that windows should not have
	     titlebars.  If the optional _w_i_n-_l_i_s_t is given, only
	     those windows will not have titlebars.  [1mMakeTitle
	     [0mmay be used with this option to force titlebars to
	     be put on specific windows.

     [1mNoTitleFocus
	     [0mThis variable indicates that _t_w_m should not set key-
	     board input focus to each window as it is entered.



Printed 25/11/91	    Release 4			       14






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     Normally, _t_w_m sets the focus so that focus and key
	     events from the titlebar and icon managers are
	     delivered to the application.  If the pointer is
	     moved quickly and _t_w_m is slow to respond, input can
	     be directed to the old window instead of the new.
	     This option is typically used to prevent this
	     ``input lag'' and to work around bugs in older
	     applications that have problems with focus events.

     [1mNoTitleHighlight [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that the highlight area of
	     the titlebar, which is used to indicate the window
	     that currently has the input focus, should not be
	     displayed.  If the optional _w_i_n-_l_i_s_t is given, only
	     those windows will not have highlight areas.  This
	     and the [1mSqueezeTitle [0moptions can be set to substan-
	     tially reduce the amount of screen space required by
	     titlebars.

     [1mOpaqueMove
	     [0mThis variable indicates that the [1mf.move [0mfunction
	     should actually move the window instead of just an
	     outline so that the user can immediately see what
	     the window will look like in the new position.  This
	     option is typically used on fast displays (particu-
	     larly if [1mNoGrabServer [0mis set).

     [1mPixmaps [0m{ _p_i_x_m_a_p_s }
	     This variable specifies a list of pixmaps that
	     define the appearance of various images.  Each entry
	     is a keyword indicating the pixmap to set, followed
	     by a string giving the name of the bitmap file.  The
	     following pixmaps may be specified:

		  [1mPixmaps
		  [0m{
		       TitleHighlight "gray1"
		  }

	     The default for _T_i_t_l_e_H_i_g_h_l_i_g_h_t is to use an even
	     stipple pattern.

     [1mRandomPlacement
	     [0mThis variable indicates that windows with no speci-
	     fied geometry should should be placed in a pseudo-
	     random location instead of having the user drag out
	     an outline.

     [1mResizeFont [0m_s_t_r_i_n_g
	     This variable specifies the font to be used for in
	     the dimensions window when resizing windows.  The
	     default is "fixed".



Printed 25/11/91	    Release 4			       15






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mRestartPreviousState
	     [0mThis variable indicates that _t_w_m should attempt to
	     use the WM_STATE property on client windows to tell
	     which windows should be iconified and which should
	     be left visible.  This is typically used to make try
	     to regenerate the state that the screen was in
	     before the previous window manager was shutdown.

     [1mShowIconManager
	     [0mThis variable indicates that the icon manager window
	     should be displayed when _t_w_m is started.  It can
	     always be brought up using the [1mf.showiconmgr [0mfunc-
	     tion.

     [1mSortIconManager
	     [0mThis variable indicates that entries in the icon
	     manager should be sorted alphabetically rather than
	     by simply appending new windows to the end.

     [1mSqueezeTitle [0m[{ _s_q_u_e_e_z_e-_l_i_s_t }]
	     This variable indicates that _t_w_m should attempt to
	     use the SHAPE extension to make titlebars occupy
	     only as much screen space as they need, rather than
	     extending all the way across the top of the window.
	     The optional _s_q_u_e_e_z_e-_l_i_s_t may be used to control the
	     location of the squeezed titlebar along the top of
	     the window.  It contains entries of the form:

		       "_n_a_m_e"	      _j_u_s_t_i_f_i_c_a_t_i_o_n  _n_u_m  _d_e_n_o_m

	     where _n_a_m_e is a window name, _j_u_s_t_i_f_i_c_a_t_i_o_n is either
	     [1mleft[0m, [1mcenter[0m, or [1mright[0m, and _n_u_m and _d_e_n_o_m are
	     numbers specifying a ratio giving the relative posi-
	     tion about which the titlebar is justified.  The
	     ratio is measured from left to right if the numera-
	     tor is positive, and right to left if negative.  A
	     denominator of 0 indicates that the numerator should
	     be measured in pixels.  For convenience, the ratio
	     0/0 is the same as 1/2 for [1mcenter [0mand -1/1 for
	     [1mright[0m.  For example:

		  [1mSqueezeTitle
		  [0m{
		       "XTerm"	 left	   0	0
		       "xterm1"  left	   1	3
		       "xterm2"  left	   2	3
		       "oclock"  center         0    0
		       "emacs"	 right		0    0
		  }

	     The [1mDontSqueezeTitle [0mlist can be used to turn off
	     squeezing on certain titles.



Printed 25/11/91	    Release 4			       16






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mStartIconified [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that client windows should
	     initially be left as icons until explicitly deiconi-
	     fied by the user.	If the optional _w_i_n-_l_i_s_t is
	     given, only those windows will be started iconic.
	     This is useful for programs that do not support an
	     -_i_c_o_n_i_c command line option or resource.

     [1mTitleBackground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the background color used in
	     titlebars, and may only be specified inside of a
	     [1mColor [0mor [1mMonochrome [0mlist.	The optional _w_i_n-_l_i_s_t is
	     a list of window names and colors so that per-window
	     colors may be specified.  The default is "white".

     [1mTitleButtonBorderWidth [0m_p_i_x_e_l_s
	     This variable specifies the width in pixels of the
	     border surrounding titlebuttons.  This is typically
	     set to 0 to allow titlebuttons to take up as much
	     space as possible and to not have a border.  The
	     default is 1.

     [1mTitleFont [0m_s_t_r_i_n_g
	     This variable specifies the font to used for
	     displaying window names in titlebars.  The default
	     is "8x13".

     [1mTitleForeground [0m_s_t_r_i_n_g [{ _w_i_n-_l_i_s_t }]
	     This variable specifies the foreground color used in
	     titlebars, and may only be specified inside of a
	     [1mColor [0mor [1mMonochrome [0mlist.	The optional _w_i_n-_l_i_s_t is
	     a list of window names and colors so that per-window
	     colors may be specified.  The default is "black".

     [1mTitlePadding [0m_p_i_x_e_l_s
	     This variable specifies the distance between the
	     various buttons, text, and highlight areas in the
	     titlebar.	The default is 8 pixels.

     [1mUnknownIcon [0m_s_t_r_i_n_g
	     This variable specifies the filename of a bitmap
	     file to be used as the default icon.  This bitmap
	     will be used as the icon of all clients which do not
	     provide an icon bitmap and are not listed in the
	     [1mIcons [0mlist.

     [1mUsePPosition [0m_s_t_r_i_n_g
	     This variable specifies whether or not _t_w_m should
	     honor program-requested locations (given by the [1mPPo-
	     sition [0mflag in the WM_NORMAL_HINTS property) in the
	     absence of a user-specified position.  The argument
	     _s_t_r_i_n_g may have one of three values:  [1m"off" [0m(the



Printed 25/11/91	    Release 4			       17






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     default) indicating that _t_w_m should ignore the
	     program-supplied position, [1m"on" [0mindicating that the
	     position should be used, and [1m"non-zero" [0mindicating
	     that the position should used if it is other than
	     (0,0).  The latter option is for working around a
	     bug in older toolkits.

     [1mWarpCursor [0m[{ _w_i_n-_l_i_s_t }]
	     This variable indicates that the pointer should be
	     warped into windows when they are deiconified.  If
	     the optional _w_i_n-_l_i_s_t is given, the pointer will
	     only be warped when those windows are deiconified.

     [1mWindowRing [0m{ _w_i_n-_l_i_s_t }
	     This variable specifies a list of windows along
	     which the [1mf.warpring [0mfunction cycles.

     [1mWarpUnmapped
	     [0mThis variable indicates that that the [1mf.warpto [0mfunc-
	     tion should deiconify any iconified windows it
	     encounters.  This is typically used to make a key
	     binding that will pop a particular window (such as
	     _x_m_h), no matter where it is.  The default is for
	     [1mf.warpto [0mto ignore iconified windows.

     [1mXorValue [0m_n_u_m_b_e_r
	     This variable specifies the value to use when draw-
	     ing window outlines for moving and resizing.  This
	     should be set to a value that will result in a
	     variety of of distinguishable colors when
	     exclusive-or'ed with the contents of the user's typ-
	     ical screen.  Setting this variable to 1 often gives
	     nice results if adjacent colors in the default
	     colormap are distinct.  By default, _t_w_m will attempt
	     to cause temporary lines to appear at the opposite
	     end of the colormap from the graphics.

     [1mZoom [0m[ _c_o_u_n_t ]
	     This variable indicates that outlines suggesting
	     movement of a window to and from its iconified state
	     should be displayed whenever a window is iconified
	     or deiconified.  The optional _c_o_u_n_t argument speci-
	     fies the number of outlines to be drawn.  The
	     default count is 8.

     The following variables must be set after the fonts have
     been assigned, so it is usually best to put them at the end
     of the variables or beginning of the bindings sections:

     [1mDefaultFunction [0m_f_u_n_c_t_i_o_n
	     This variable specifies the function to be executed
	     when a key or button event is received for which no



Printed 25/11/91	    Release 4			       18






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     binding is provided.  This is typically bound to
	     [1mf.nop[0m, [1mf.beep[0m, or a menu containing window opera-
	     tions.

     [1mWindowFunction [0m_f_u_n_c_t_i_o_n
	     This variable specifies the function to execute when
	     a window is selected from the [1mTwmWindows [0mmenu.  If
	     this variable is not set, the window will be deicon-
	     ified and raised.

[1mBINDINGS
     [0mAfter the desired variables have been set, functions may be
     attached titlebuttons and key and pointer buttons.
     Titlebuttons may be added from the left or right side and
     appear in the titlebar from left-to-right according to the
     order in which they are specified.  Key and pointer button
     bindings may be given in any order.

     Titlebuttons specifications must include the name of the
     pixmap to use in the button box and the function to be
     invoked when a pointer button is pressed within them:

	  [1mLeftTitleButton [0m"_b_i_t_m_a_p_n_a_m_e"	= _f_u_n_c_t_i_o_n

     or

	  [1mRightTitleButton [0m"_b_i_t_m_a_p_n_a_m_e" = _f_u_n_c_t_i_o_n

     The _b_i_t_m_a_p_n_a_m_e may refer to one of the  built-in bitmaps
     (which are scaled to match [1mTitleFont[0m) by using the appropri-
     ate colon-prefixed name described above.

     Key and pointer button specifications must give the modif-
     iers that must be pressed, over which parts of the screen
     the pointer must be, and what function is to be invoked.
     Keys are given as strings containing the appropriate keysym
     name; buttons are given as the keywords [1mButton1[0m-[1mButton5[0m:

	  "FP1"          = _m_o_d_l_i_s_t : _c_o_n_t_e_x_t : _f_u_n_c_t_i_o_n
	  [1mButton1   [0m= _m_o_d_l_i_s_t : _c_o_n_t_e_x_t : _f_u_n_c_t_i_o_n

     The _m_o_d_l_i_s_t is any combination of the modifier names [1mshift[0m,
     [1mcontrol[0m, [1mlock[0m, [1mmeta[0m, [1mmod1[0m, [1mmod2[0m, [1mmod3[0m, [1mmod4[0m, or [1mmod1 [0m(which
     may be abbreviated as [1ms[0m, [1mc[0m, [1ml[0m, [1mm[0m, [1mm1[0m, [1mm2[0m, [1mm3[0m, [1mm4[0m, [1mm5[0m,
     respectively) separated by a vertical bar (|).  Similarly,
     the _c_o_n_t_e_x_t is any combination of [1mwindow[0m, [1mtitle[0m, [1micon[0m, [1mroot[0m,
     [1mframe[0m, [1miconmgr[0m, their first letters ([1miconmgr [0mabbreviation is
     [1mm[0m), or [1mall[0m, separated by a vertical bar.  The _f_u_n_c_t_i_o_n is
     any of the [1mf. [0mkeywords described below.  For example, the






Printed 25/11/91	    Release 4			       19






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     default startup file contains the following bindings:

	  Button1   =	 : root         : f.menu "TwmWindows"
	  Button1   = m  : window | icon     : f.function "move-or-lower"
	  Button2   = m  : window | icon     : f.iconify
	  Button3   = m  : window | icon     : f.function "move-or-raise"
	  Button1   =	 : title	: f.function "move-or-raise"
	  Button2   =	 : title	: f.raiselower
	  Button1   =	 : icon         : f.function "move-or-iconify"
	  Button2   =	 : icon         : f.iconify
	  Button1   =	 : iconmgr : f.iconify
	  Button2   =	 : iconmgr : f.iconify

     A user who wanted to be able to manipulate windows from the
     keyboard could use the following bindings:

	  "F1"	    =	 : all		: f.iconify
	  "F2"	    =	 : all		: f.raiselower
	  "F3"	    =	 : all		: f.warpring "next"
	  "F4"	    =	 : all		: f.warpto "xmh"
	  "F5"	    =	 : all		: f.warpto "emacs"
	  "F6"	    =	 : all		: f.colormap "next"
	  "F7"	    =	 : all		: f.colormap "default"
	  "F20"          =    : all	     : f.warptoscreen "next"
	  "Left"	 = m  : all	     : f.backiconmgr
	  "Right"   = m | s   : all	     : f.forwiconmgr
	  "Up"	    = m  : all		: f.upiconmgr
	  "Down"    = m | s   : all	     : f.downiconmgr

     _T_w_m provides many more window manipulation primitives than
     can be conveniently stored in a titlebar, menu, or set of
     key bindings.  Although a small set of defaults are supplied
     (unless the [1mNoDefaults [0mis specified), most users will want
     to have their most common operations bound to key and button
     strokes.  To do this, _t_w_m associates names with each of the
     primitives and provides _u_s_e_r-_d_e_f_i_n_e_d _f_u_n_c_t_i_o_n_s for building
     higher level primitives and _m_e_n_u_s for interactively select-
     ing among groups of functions.

     User-defined functions contain the name by which they are
     referenced in calls to [1mf.function [0mand a list of other func-
     tions to execute.	For example:

	  Function "move-or-lower" { f.move f.deltastop f.lower }
	  Function "move-or-raise" { f.move f.deltastop f.raise }
	  Function "move-or-iconify"	{ f.move f.deltastop f.iconify }
	  Function "restore-colormap"	{ f.colormap "default" f.lower }

     The function name must be used in [1mf.function [0mexactly as it
     appears in the function specification.





Printed 25/11/91	    Release 4			       20






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     In the descriptions below, if the function is said to
     operate on the selected window, but is invoked from a root
     menu, the cursor will be changed to the [1mSelect [0mcursor and
     the next window to receive a button press will be chosen:

     [1m! [0m_s_t_r_i_n_g
	     This is an abbreviation for [1mf.exec [0m_s_t_r_i_n_g.

     [1mf.autoraise
	     [0mThis function toggles whether or not the selected
	     window is raised whenever entered by the pointer.
	     See the description of the variable [1mAutoRaise[0m.

     [1mf.backiconmgr
	     [0mThis function warps the pointer to the previous
	     column in the current icon manager, wrapping back to
	     the previous row if necessary.

     [1mf.beep  [0mThis function sounds the keyboard bell.

     [1mf.bottomzoom
	     [0mThis function is similar to the [1mf.fullzoom [0mfunction,
	     but resizes the window to fill only the bottom half
	     of the screen.

     [1mf.circledown
	     [0mThis function lowers the top-most window that
	     occludes another window.

     [1mf.circleup
	     [0mThis function raises the bottom-most window that is
	     occluded by another window.

     [1mf.colormap [0m_s_t_r_i_n_g
	     This function rotates the colormaps (obtained from
	     the WM_COLORMAP_WINDOWS property on the window) that
	     _t_w_m will display when the pointer is in this window.
	     The argument _s_t_r_i_n_g may have one of the following
	     values: [1m"next"[0m, [1m"prev"[0m, and [1m"default"[0m.

     [1mf.deiconify
	     [0mThis function deiconifies the selected window.  If
	     the window is not an icon, this function does noth-
	     ing.

     [1mf.delete
	     [0mThis function sends the WM_DELETE_WINDOW message to
	     the selected window if the client application has
	     requested it through the WM_PROTOCOLS window pro-
	     perty.  The application is supposed to respond to
	     the message by removing the indicated window.  If
	     the window has not requested WM_DELETE_WINDOW



Printed 25/11/91	    Release 4			       21






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     messages, the keyboard bell will be rung indicating
	     that the user should choose an alternative method.

     [1mf.deltastop
	     [0mThis function allows a user-defined function to be
	     aborted if the pointer has been moved more than
	     _M_o_v_e_D_e_l_t_a pixels.	See the example definition given
	     for [1mFunction "move-or-raise" [0mat the beginning of the
	     section.

     [1mf.destroy
	     [0mThis function instructs the X server to close the
	     display connection of the client that created the
	     selected window.  This should only be used as a last
	     resort for shutting down runaway clients.

     [1mf.downiconmgr
	     [0mThis function warps the pointer to the next row in
	     the current icon manger, wrapping to the beginning
	     of the next column if necessary.

     [1mf.exec [0m_s_t_r_i_n_g
	     This function passes the argument _s_t_r_i_n_g to /bin/sh
	     for execution.  In multiscreen mode, if _s_t_r_i_n_g
	     starts a new X client without giving a display argu-
	     ment, the client will appear on the screen from
	     which this function was invoked.

     [1mf.focus [0mThis function toggles the keyboard focus of the
	     server to the selected window, changing the focus
	     rule from pointer-driven if necessary.  If the
	     selected window already was focused, this function
	     executes an [1mf.unfocus[0m.

     [1mf.forcemove
	     [0mThis function is like [1mf.move [0mexcept that it ignores
	     the [1mDontMoveOff [0mvariable.

     [1mf.forwiconmgr
	     [0mThis function warps the pointer to the next column
	     in the current icon manager, wrapping to the begin-
	     ning of the next row if necessary.

     [1mf.fullzoom
	     [0mThis function resizes the selected window to the
	     full size of the display or else restores the origi-
	     nal size if the window was already zoomed.

     [1mf.function [0m_s_t_r_i_n_g
	     This function executes the user-defined function
	     whose name is specified by the argument _s_t_r_i_n_g.




Printed 25/11/91	    Release 4			       22






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mf.hbzoom
	     [0mThis function is a synonym for [1mf.bottomzoom[0m.

     [1mf.hideiconmgr
	     [0mThis function unmaps the current icon manager.

     [1mf.horizoom
	     [0mThis variable is similar to the [1mf.zoom [0mfunction
	     except that the selected window is resized to the
	     full width of the display.

     [1mf.htzoom
	     [0mThis function is a synonym for [1mf.topzoom[0m.

     [1mf.hzoom [0mThis function is a synonym for [1mf.horizoom[0m.

     [1mf.iconify
	     [0mThis function iconifies or deiconifies the selected
	     window or icon, respectively.

     [1mf.identify
	     [0mThis function displays a summary of the name and
	     geometry of the selected window.  Clicking the
	     pointer or pressing a key in the window will dismiss
	     it.

     [1mf.lefticonmgr
	     [0mThis function similar to [1mf.backiconmgr [0mexcept that
	     wrapping does not change rows.

     [1mf.leftzoom
	     [0mThis variable is similar to the [1mf.bottomzoom [0mfunc-
	     tion but causes the selected window is only resized
	     to the left half of the display.

     [1mf.lower [0mThis function lowers the selected window.

     [1mf.menu [0m_s_t_r_i_n_g
	     This function invokes the menu specified by the
	     argument _s_t_r_i_n_g.  Cascaded menus may be built by
	     nesting calls to [1mf.menu[0m.

     [1mf.move  [0mThis function drags an outline of the selected win-
	     dow (or the window itself if the [1mOpaqueMove [0mvariable
	     is set) until the invoking pointer button is
	     released.	Double clicking within the number of mil-
	     liseconds given by [1mConstrainedMoveTime [0mwarps the
	     pointer to the center of the window and constrains
	     the move to be either horizontal or vertical depend-
	     ing on which grid line is crossed.  To abort a move,
	     press another button before releasing the first but-
	     ton.



Printed 25/11/91	    Release 4			       23






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mf.nexticonmgr
	     [0mThis function warps the pointer to the next icon
	     manager containing any windows on the current or any
	     succeeding screen.

     [1mf.nop   [0mThis function does nothing and is typically used
	     with the [1mDefaultFunction [0mor [1mWindowFunction [0mvariables
	     or to introduce blank lines in menus.

     [1mf.previconmgr
	     [0mThis function warps the pointer to the previous icon
	     manager containing any windows on the current or
	     preceding screens.

     [1mf.quit  [0mThis function causes _t_w_m to restore the window's
	     borders and exit.	If _t_w_m is the first client
	     invoked from _x_d_m, this will result in a server
	     reset.

     [1mf.raise [0mThis function raises the selected window.

     [1mf.raiselower
	     [0mThis function raises the selected window to the top
	     of the stacking order if it is occluded by any win-
	     dows, otherwise the window will be lowered.

     [1mf.refresh
	     [0mThis function causes all windows to be refreshed.

     [1mf.resize
	     [0mThis function displays an outline of the selected
	     window.  Crossing a border (or setting [1mAutoRela-
	     tiveResize[0m) will cause the outline to begin to
	     rubber band until the invoking button is released.
	     To abort a resize, press another button before
	     releasing the first button.

     [1mf.restart
	     [0mThis function kills and restarts _t_w_m.

     [1mf.righticonmgr
	     [0mThis function is similar to [1mf.nexticonmgr [0mexcept
	     that wrapping does not change rows.

     [1mf.rightzoom
	     [0mThis variable is similar to the [1mf.bottomzoom [0mfunc-
	     tion except that the selected window is only resized
	     to the right half of the display.

     [1mf.saveyourself
	     [0mThis function sends a WM_SAVEYOURSELF message to the
	     selected window if it has requested the message in



Printed 25/11/91	    Release 4			       24






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



	     its WM_PROTOCOLS window property.	Clients that
	     accept this message are supposed to checkpoint all
	     state associated with the window and update the
	     WM_COMMAND property as specified in the ICCCM.  If
	     the selected window has not selected for this mes-
	     sage, the keyboard bell will be rung.

     [1mf.showiconmgr
	     [0mThis function maps the current icon manager.

     [1mf.sorticonmgr
	     [0mThis function sorts the entries in the current icon
	     manager alphabetically.  See the variable [1mSortIcon-
	     Manager[0m.

     [1mf.title [0mThis function provides a centered, unselectable item
	     in a menu definition.  It should not be used in any
	     other context.

     [1mf.topzoom
	     [0mThis variable is similar to the [1mf.bottomzoom [0mfunc-
	     tion except that the selected window is only resized
	     to the top half of the display.

     [1mf.unfocus
	     [0mThis function resets the focus back to pointer-
	     driven.  This should be used when a focused window
	     is no longer desired.

     [1mf.upiconmgr
	     [0mThis function warps the pointer to the previous row
	     in the current icon manager, wrapping to the last
	     row in the same column if necessary.

     [1mf.vlzoom
	     [0mThis function is a synonym for [1mf.leftzoom[0m.

     [1mf.vrzoom
	     [0mThis function is a synonym for [1mf.rightzoom[0m.

     [1mf.warpring [0m_s_t_r_i_n_g
	     This function warps the pointer to the next or pre-
	     vious window (as indicated by the argument _s_t_r_i_n_g,
	     which may be [1m"next" [0mor [1m"prev"[0m) specified in the [1mWin-
	     dowRing [0mvariable.

     [1mf.warpto [0m_s_t_r_i_n_g
	     This function warps the pointer to the window which
	     has a name or class that matches _s_t_r_i_n_g.  If the
	     window is iconified, it will be deiconified if the
	     variable [1mWarpUnmapped [0mis set or else ignored.




Printed 25/11/91	    Release 4			       25






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     [1mf.warptoiconmgr [0m_s_t_r_i_n_g
	     This function warps the pointer to the icon manager
	     entry associated with the window containing the
	     pointer in the icon manager specified by the argu-
	     ment _s_t_r_i_n_g.  If _s_t_r_i_n_g is empty (i.e. ""), the
	     current icon manager is chosen.

     [1mf.warptoscreen [0m_s_t_r_i_n_g
	     This function warps the pointer to the screen speci-
	     fied by the argument _s_t_r_i_n_g.  _S_t_r_i_n_g may be a number
	     (e.g. [1m"0" [0mor [1m"1"[0m), the word [1m"next" [0m(indicating the
	     current screen plus 1, skipping over any unmanaged
	     screens), the word [1m"back" [0m(indicating the current
	     screen minus 1, skipping over any unmanaged
	     screens), or the word [1m"prev" [0m(indicating the last
	     screen visited.

     [1mf.winrefresh
	     [0mThis function is similar to the [1mf.refresh [0mfunction
	     except that only the selected window is refreshed.

     [1mf.zoom  [0mThis function is similar to the [1mf.fullzoom [0mfunction,
	     except that the only the height of the selected win-
	     dow is changed.

[1mMENUS
     [0mFunctions may be grouped and interactively selected using
     pop-up (when bound to a pointer button) or pull-down (when
     associated with a titlebutton) menus.  Each menu specifica-
     tion contains the name of the menu as it will be referred to
     by [1mf.menu[0m, optional default foreground and background
     colors, the list of item names and the functions they should
     invoke, and optional foreground and background colors for
     individual items:

	  [1mMenu [0m"_m_e_n_u_n_a_m_e" [ ("_d_e_f_f_o_r_e":"_d_e_f_b_a_c_k") ]
	  {
	       _s_t_r_i_n_g_1	 [ ("_f_o_r_e_1":"_b_a_c_k_n")]	  _f_u_n_c_t_i_o_n_1
	       _s_t_r_i_n_g_2	 [ ("_f_o_r_e_2":"_b_a_c_k_n")]	  _f_u_n_c_t_i_o_n_2
		    .
		    .
		    .
	       _s_t_r_i_n_g_N	 [ ("_f_o_r_e_N":"_b_a_c_k_N")]	  _f_u_n_c_t_i_o_n_N
	  }


     The _m_e_n_u_n_a_m_e is case-sensitive.  The optional _d_e_f_f_o_r_e and
     _d_e_f_b_a_c_k arguments specify the foreground and background
     colors used on a color display to highlight menu entries.
     The _s_t_r_i_n_g portion of each menu entry will be the text which
     will appear in the menu.  The optional _f_o_r_e and _b_a_c_k argu-
     ments specify the foreground and background colors of the



Printed 25/11/91	    Release 4			       26






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     menu entry when the pointer is not in the entry.  These
     colors will only be used on a color display.  The default is
     to use the colors specified by the [1mMenuForeground [0mand [1mMenu-
     Background [0mvariables.  The _f_u_n_c_t_i_o_n portion of the menu
     entry is one of the functions, including any user-defined
     functions, or additional menus.

     There is a special menu named [1mTwmWindows [0mwhich contains the
     names of all of the client and _t_w_m-supplied windows.
     Selecting an entry will cause the [1mWindowFunction [0mto be exe-
     cuted on that window.  If [1mWindowFunction [0mhasn't been set,
     the window will be deiconified and raised.

[1mICONS
     [0m_T_w_m supports several different ways of manipulating iconi-
     fied windows.  The common pixmap-and-text style may be laid
     out by hand or automatically arranged as described by the
     [1mIconRegion [0mvariable.  In addition, a terse grid of icon
     names, called an icon manager, provides a more efficient use
     of screen space as well as the ability to navigate among
     windows from the keyboard.

     An icon manager is a window that contains names of selected
     or all windows currently on the display.  In addition to the
     window name, a small button using the default iconify symbol
     will be displayed to the left of the name when the window is
     iconified.  By default, clicking on an entry in the icon
     manager performs [1mf.iconify[0m.  To change the actions taken in
     the icon manager, use the the [1miconmgr [0mcontext when specify-
     ing button and keyboard bindings.

     Moving the pointer into the icon manager also directs key-
     board focus to the indicated window (setting the focus
     explicitly or else sending synthetic events [1mNoTitleFocus [0mis
     set).  Using the [1mf.upiconmgr[0m, [1mf.downiconmgr f.lefticonmgr[0m,
     and [1mf.righticonmgr [0mfunctions, the input focus can be changed
     between windows directly from the keyboard.

[1mBUGS
     [0mThe resource manager should have been used instead of all of
     the window lists.

     The [1mIconRegion [0mvariable should take a list.

     Double clicking very fast to get the constrained move func-
     tion will sometimes cause the window to move, even though
     the pointer is not moved.

     If [1mIconifyByUnmapping [0mis on and windows are listed in [1mIcon-
     ManagerDontShow [0mbut not in [1mDontIconifyByUnmapping[0m, they may
     be lost if they are iconified and no bindings to [1mf.menu
     "TwmWindows" [0mor [1mf.warpto [0mare setup.



Printed 25/11/91	    Release 4			       27






TWM(1)		    UNIX Programmer's Manual		   TWM(1)



     When other applications are started from _t_w_m using the
     [1mf.exec [0mfunction these applications belong to the same pro-
     cess group as _t_w_m.  In general killing _t_w_m will also kill
     the client applications started from it; in particular if
     _t_w_m is started from _x_s_m(1) changing window managers from the
     _x_s_m client window will cause all the clients started from
     _t_w_m to terminate.

[1mFILES
      [0m$HOME/.twmrc.<screen number>
      $HOME/.twmrc
      /usr/lib/X11/twm/system.twmrc

[1mENVIRONMENT VARIABLES
     [0mDISPLAY This variable is used to determine which X server to
	     use.  It is also set during [1mf.exec [0mso that programs
	     come up on the proper screen.

     HOME    This variable is used as the prefix for files that
	     begin with a tilde and for locating the _t_w_m startup
	     file.

[1mSEE ALSO
     [0mX(1), Xserver(1), xdm(1), xrdb(1)

[1mCOPYRIGHT
     [0mPortions copyright 1988 Evans & Sutherland Computer Corpora-
     tion; portions copyright 1989 Hewlett-Packard Company and
     the Massachusetts Institute of Technology,  See _X(_1) for a
     full statement of rights and permissions.

[1mAUTHORS
     [0mTom LaStrange, Solbourne Computer; Jim Fulton, MIT X Consor-
     tium; Steve Pitschke, Stardent Computer; Keith Packard, MIT
     X Consortium; Dave Payne, Apple Computer.




















Printed 25/11/91	    Release 4			       28



[0m