[comp.sources.unix] v15i067: A window manager for X, Part04/04

rsalz@uunet.uu.net (Rich Salz) (06/14/88)

Submitted-by: Tom LaStrange <esunix!tlastran>
Posting-number: Volume 15, Issue 67
Archive-name: twm/part04

[  I shar'd the manpage.  -r$ ]

#! /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 shell archive."
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'twm.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'twm.man'\"
else
echo shar: Extracting \"'twm.man'\" \(14305 characters\)
sed "s/^X//" >'twm.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
X.fi
X.in -.5i
X.if n .sp 1
X.if t .sp .5
X..
X.TH TWM 1 "6 April 1988" "X Version 11"
X.SH NAME
X.PP
Xtwm - a window manager for X11 (Tom's Window Manager)
X.PP
X.SH SYNTAX
X.PP
X\fBtwm \fP[-display \fIdisplay\fP]
X.PP
X.SH DESCRIPTION
X.PP
XThe \fItwm\fP program is a window manager client 
Xapplication of the window 
Xserver.
X.PP
XThe \fItwm\fP program was written to try and incorporate some of the
Xdesirable features of both the \fBwm\fP and \fBuwm\fP window managers.
X\fITwm\fP puts a title bar on  and re-parents each window.
XThe title bar contains the
Xwindow's name and three "buttons".  When a pointer button press event
Xis detected in any of these title bar "buttons" a certain action is
Xperformed.  The left-most title bar button that looks like a window pane
Xcauses the window to be iconified.  The right-most title bar button with
Xthe right-angles is the re-size button.  The resize function is identical
Xto the window resize function of the \fBwm\fP window manager.  The other
Xtitle bar button is supposed to represent a keyboard,  a button click here
Xcauses the input focus to be directed to this window until the \fBf.focus\fP
Xfunction is executed or another window is selected to get input focus.
XThe title bar has the additional feature of becoming highlighted if the
Xwindow has the input focus.
X.PP
XWhen \fItwm\fP is invoked, it attempts to read a \fItwm\fP startup file.
XThe name of the \fItwm\fP startup file is:
X.sp
X  $HOME/.twmrc\fP
X.PP
XThe \fItwm\fP startup file can be thought of as having three logical
Xsections: the variables section, the buttons section, and the menus
Xsection.  The variables section must come first, followed by either the
Xbuttons section or the menus section.
X.PP
XAll variables and keywords may be
Xentered in any combination of upper and lower case letters.  Title
Xfunctions and Root functions must be entered in lower case. A 
Xpound sign (#) character in the startup file indicates a comment 
Xwhich is terminated by the newline character.  A \fIstring\fP in
Xthe startup file is a series of characters enclosed by double quotes.
X.PP
X.SH VARIABLES SECTION
X.PP
XVariables must be entered first, at the top of the startup
Xfile.  Variables are initialized once when \fItwm\fP begins
Xexecution, they will not be effected when a \fBf.twmrc\fP
Xfunction is executed.
X.IP "\fBAutoRaise\fP { \fIlist\fP }" 20
XThis variable is a list of window names that will automatically
Xraise to the top of the stacking order whenever the pointer enters
Xthe window.  The window names in the list are the first characters
Xin the window name to check for.  For example:
X.EX 0
X\fBAutoRaise\fP
X{
X   "xterm"
X   "xclock"
X}
X.EE
XThe above list contains two names which will match window names beginning
Xwith the string "xterm" or "xclock".  The following window names will match
Xand be in auto-raise mode: "xterm", "xterm_iguana", "xclock".
X.IP "\fBBorderWidth\fP \fIpixels\fP" 20 
XThis variable specifies the width in pixels of of the border surrounding all
Xwindows.  The default is 2.
X.IP "\fBIconFont\fP \fIstring\fP" 20
XThis variable names the font to be displayed within icons.  The default
Xis "8x13".
X.IP "\fBMenuFont\fP \fIstring\fP" 20
XThis variable names the font to be displayed within menus.  The default
Xis "8x13".
X.IP "\fBNoTitle\fP { \fIlist\fP }" 20
XThis variable is a list of window names that will NOT have a title
Xbar created for them.  If the client does not get ButtonPress events,
X\fItwm\fP will get them and all Title functions currently in effect
Xwill work when pointer buttons are pressed in the client window.  The list
Xof windows and how they match window names is exactly like the 
X\fBAutoRaise\fP variable described above.
X.IP "\fBResizeFont\fP \fIstring\fP" 20
XThis variable names the font to be displayed in the dimensions window
Xduring window resize operations.
XThe default is "fg-22".
X.IP "\fBTitleFont\fP \fIstring\fP" 20
XThis variable names the font to be displayed within
Xthe window title bar.  Note that the title bar is only 17 pixels in height,
Xso the largest practical font would be something like "9x15". The default
Xis "8x13".
X.IP "\fBReverseVideo\fP" 20 
XThis variable causes \fItwm\fP to display white characters
Xon a black background,
Xrather than black characters on white.
X.IP "\fBUnknownIcon\fP \fIstring\fP" 20
XThis variable specifies the file name of a bitmap format file to be
Xused as the default icon.  This bitmap will be used for the icon of all
Xclients which do not provide an icon bitmap.  The default is to use
Xno bitmap.
X.IP "\fBWarpCursor\fP" 20
XThis variable causes the pointer cursor to be warped to a window which
Xis being deiconified.  The default is to not warp the cursor.
X.PP
X.SH BUTTONS SECTION
X.PP
XThe buttons section of the startup file contains definitions of functions
Xto perform when pointer buttons are pressed.  There are two classes of functions
Xthat can be tied to a pointer button:  Title functions, which will be
Xexecuted if a pointer button is pressed while the pointer is in
Xthe title bar of a window; and Root functions, which will be executed 
Xwhile the pointer is in the root window or if the client program is
Xnot processing pointer button events.
X.PP
XTitle functions are assigned as follows:
X.IP "\fBTitleButton\fP\fIn\fP \fIt.function\fP" 20
X\fBTitleButton\fP is a startup file keyword.  The \fIn\fP following 
X\fBTitleButton\fP can be a number between 1 and 5 to indicate which pointer 
Xbutton the function is to be tied to. \fIt.function\fP may be any one of the
Xfollowing title functions.
X.PP
X.SH Title Functions
X.PP
X.IP \fBt.lower\fP 20
XThis function lowers the window to the bottom of the stacking order.
X.IP \fBt.move\fP 20
XThis function causes a grid to appear over the window which can be moved 
Xto where you want the window to be moved.  Double clicking the pointer 
Xbutton tied to this function causes a constrained move function to be
Xexecuted.  The pointer will be warped to the center of the grid.
XMoving the pointer to one of the grid lines will cause the window 
Xto begin moving in either an up-down motion or a left-right motion
Xdepending on which grid line the pointer was moved across.
X.IP \fBt.nop\fP 20
XThis function does nothing.
X.IP \fBt.raise\fP 20
XThis function raises the window to the top of the stacking order.
X.PP
XThe defaults for title functions are as follows:
X.PP
X.IP
X\fBTitleButton1 t.raise\fP
X.IP
X\fBTitleButton2 t.move\fP
X.IP
X\fBTitleButton3 t.lower\fP
X.IP
X\fBTitleButton4 t.nop\fP
X.IP
X\fBTitleButton5 t.nop\fP
X.PP
XRoot functions are assigned either to a pointer button or a menu entry.
XThe \fBf.title\fP function is the only one that doesn't really make
Xsense to use as just a button function.  It was designed to be used in
Xa pull-down menu.  Root functions are assigned to pointer buttons
Xas follows:
X.PP
X.IP "\fBButton\fP\fIn\fP \fIfunction\fP" 20
X\fBButton\fP is a startup file keyword.  The \fIn\fP following 
X\fBButton\fP can be a number between 1 and 5 to indicate which pointer 
Xbutton the function is to be tied to. \fIfunction\fP may be any one of the
Xfollowing root functions.
X.PP
X.SH Root Functions
X.PP
X.IP "\fB!\fP \fIstring\fP" 20
XThis function causes \fIstring\fP to be sent to /bin/sh for execution.
X.IP "\fB^\fP \fIstring\fP" 20
XThis function causes \fIstring\fP followed by a new line character
Xto be placed in the window server's cut buffer.
X.IP "\fBf.circledown\fP" 20
XThis function causes the top window that is obscuring another window to
Xdrop to the bottom of the stack of windows.
X.IP "\fBf.circleup\fP" 20
XThis function raises the lowest window that is obscured by other windows.
X.IP "\fBf.cutfile\fP" 20
XThis function takes the contents of the window server's cut buffer 
Xand uses it as a filename to read into the server's cut buffer.
X.IP "\fBf.file\fP \fIstring\fP" 20
XThis function assumes \fIstring\fP is a file name.  This file is read into
Xthe window server's cut buffer.
X.IP "\fBf.focus\fP" 20
XThis function assigns input focus to the root window.
X.IP "\fBf.menu\fP \fIstring\fP" 20
XThis function assigns the pull-down menu named \fIstring\fP to a pointer
Xbutton.  If this function is used as an entry in a pull-down menu a 
Xpull-right menu will be assigned to the menu entry.
X.IP "\fBf.nop\fP" 20
XThis function does nothing.
X.IP "\fBf.quit\fP" 20
XThis function causes \fItwm\fP to exit.
X.IP "\fBf.refresh\fP" 20
XThis function causes all windows to be refreshed.
X.IP "\fBf.source\fP \fIstring\fP" 20
XThis funtion assumes \fIstring\fP is a file name.  The file is read 
Xand parsed as a \fItwm\fP startup file.
XThis
Xfunction is intended to be used only to re-build pull-down menus.  None
Xof the \fItwm\fP variables are changed.
X.IP "\fBf.title\fP \fIstring\fP" 20
XThis function is to be used as an entry in a pull-down menu.  It centers
X\fIstring\fP in a menu entry and outlines it with a border.  This function
Xmay be used more than once in a pull-down menu.
X.IP "\fBf.twmrc\fP" 20
XThis function causes the \fI$HOME/.twmrc\fP file to be re-read.  This
Xfunction is exactly like the \fBf.source\fP function without having to
Xspecify the filename.
X.IP "\fBf.version\fI" 20
XThis function causes the \fItwm\fP version window to be displayed.  This
Xwindow will be displayed until a pointer button is pressed or the
Xpointer is moved from one window to another.
X.PP
X.SH MENUS SECTION
X.PP
XThe menus section is where pull-down menus are defined.  Entries in 
Xmenus consist of Root functions as described in the Buttons Section.
XThe syntax to define a menu is:
X.EX 0
X\fBMenu\fP "\fImenu name\fP"
X{
X   \fIstring\fP    \fIfunction\fP
X   \fIstring\fP    \fIfunction\fP
X	 .
X	 .
X   \fIstring\fP    \fIfunction\fP
X}
X.EE
X.PP
XThe \fImenu name\fP should be an identical string to one being
Xused with an \fBf.menu\fP Root function.  
XNote that the \fImenu name\fP is case sensative. The \fIstring\fP portion
Xof each menu entry will be the text which will appear in the menu.
XThe \fIfunction\fP portion of the menu entry is one of the Root functions
Xdescribed in the previous section.
X.PP
X.SH SPECIAL FEATURES
X.PP
XSince the X11 xterm does not provide an icon, \fItwm\fP can provide
Xa reasonable looking one for you.  When \fItwm\fP is framing a 
Xwindow it looks at the name of the window to determine if it should
Xadd an appropriate icon for xterm windows.  The names it looks for are:
X.EX 0
Xxterm
Xyterm
Xconsole
Xlogin
X.EE
XIf \fItwm\fP finds any of the above names as the first part of the window
Xname, the \fItwm\fP xterm icon bitmap is assigned as the bitmap
Xto display when the window is iconified.  
X.PP
XIf the window name begins with the string "xterm_", only the portion of the
Xname following the "xterm_" will be displayed as the window name in the
Xtitle bar.  For example:  an xterm started with "-T xterm_iguana" would
Xdisplay the name "iguana" in the title bar.
X.PP
X.SH EXAMPLES
X.PP
XThe following is an example \fItwm\fP startup file:
X.EX 0
X
X#**********************************************************************
X#
X#    .twmrc
X#
X#**********************************************************************
X
XWarpCursor
XUnknownIcon	"/usr/ias_soft/tlastrange/.icon"
XBorderWidth	2
XTitleFont	"8x13"
XMenuFont	"8x13"
XIconFont	"8x13"
X
XButton1		f.menu "button1"
XButton2		f.menu "button2"
XButton3		f.menu "button3"
XButton4		f.nop
XButton5		f.nop
X
XTitleButton1	t.raise
XTitleButton2	t.move
XTitleButton3	t.lower
XTitleButton4	t.nop
XTitleButton5	t.nop
X
XAutoRaise
X{
X  "xterm"	# all of my xterm windows will auto-raise
X}
X
XNoTitle
X{
X  "xclock"	# don't need a title bar on this ...
X  "xckmail"	# or this
X}
X
Xmenu "button1"
X{
X"Sun Systems"	f.title
X"iguana" 	!"xterm -T xterm_iguana =80x24+100+100 -e rlogin iguana &"
X"worm"		!"xterm -T xterm_worm =80x24+100+100 &"
X"shiva"		!"xterm -T xterm_shiva =80x24+200+200 -e rlogin shiva &"
X"tegus"		!"xterm -T xterm_tegus =80x24+200+200 -e rlogin tegus &"
X"Vax Systems"	f.title
X"shade"		!"xterm -T xterm_shade =80x24+200+200 -e rlogin shade &"
X"bilbo"		!"xterm -T xterm_bilbo =80x24+250+250 -e rlogin bilbo &"
X"frodo"		!"xterm -T xterm_frodo =80x24+300+300 -e rlogin frodo &"
X"esunix" 	!"xterm -T xterm_esunix =80x24+350+350 -e rlogin esunix &"
X"lynx8"		!"xterm -T xterm_lynx8 =80x24+390+390 -e rlogin lynx8 &"
X}
X
Xmenu "button2"
X{
X"Window Ops"		f.title
X"Refresh"		f.refresh
X"Focus on Root"		f.focus
X"Source .twmrc"		f.twmrc
X"Source something"	f.source "something"
X"twm Version"		f.version
X}
X
Xmenu "button3"
X{
X"Cut Buffer"		f.title
X"Procedure Header"	f.file "/usr/ias_soft/tlastrange/src/proc.twm"
X"File Header"		f.file "/usr/ias_soft/tlastrange/src/file.twm"
X"pull right"		f.menu "blob"
X}
X
Xmenu "blob"
X{
X"pull right"		f.menu "final"
X"another"		^"some text"
X}
X
Xmenu "final"
X{
X"entry 1"		f.nop
X"entry 2"		f.nop
X"entry 3"		f.nop
X"entry 4"		f.nop
X}
X.EE
X.PP
X.SH BUGS
X.PP
X\fITwm\fP needs to deal with color displays at some point.  Only 
Xmonochrome is currently supported.
X.PP
XPull-right menus may still have some problems.  They may sometimes
Xstay around when all pointer buttons have been released.
X.PP
XDouble clicking very fast to get the constrained move function will sometimes
Xcause the window to move, even though the pointer is not moved.
X.PP
X.SH FILES
X.PP
X $HOME/.twmrc
X.PP 
X.SH SEE ALSO
X.PP
XX(1), Xserver(1)
X
X.SH COPYRIGHT
X.ce 4
XCOPYRIGHT 1988
XEvans & Sutherland Computer Corporation
XSalt Lake City, Utah
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 EVANS & SUTHERLAND.
XEVANS & SUTHERLAND  MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY
XOF 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 the
Xcopyright notice and this permission notice appear in supporting documentation,
Xand that the name of Evans & Sutherland not be used in advertising
Xor publicity pertaining to distribution of the software without specific, 
Xwritten prior permission.
X.SH AUTHOR
XThomas E. LaStrange,
XEvans & Sutherland, Interactive Systems Division, Salt Lake City, Utah.
END_OF_FILE
if test 14305 -ne `wc -c <'twm.man'`; then
    echo shar: \"'twm.man'\" unpacked with wrong size!
fi
# end of 'twm.man'
fi
echo shar: End of shell archive.
exit 0
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.