|
TWM
TWM is the Tab window manager. It uses less memory than mwm and has
a slightly more powerful configuration language. With an appropriate configuration
file, twm can look and behave like MWM.
|
When starting up, twm first tries loading the file~/.twmrc and if unsuccessful,
it tries /usr/lib/X11/twm/system.twmrc. As with all the window managers,
detailed information about the configuration file is found on the window
manager's man page.
The Tab Window Manager (TWM) is the default window manager for X, in
much the same way as /bin/sh is the default shell for the command line.
It is (or, was) maintained by the X Consortium.
TWM is old and it shows. It is small on memory, and it really does little
besides "manage" windows. It is difficult to configure, does not support
virtual desktops, icons, button bars, pixmaps, or any other goodies which
most X users have gotten used to having. TWM is the pre-cursor to most
modern window managers in some form or another.
There are many spin-offs of TWM, such as vtwm, which supports virtual
desktops, and ctwm, which supports virtual workspaces, animating buttons,
a pager, sticky windows, and more.
There is no official TWM home page.
The configuration file for twm is called .twmrc, and a great deal of
it uses a format of definition that is rather "object menu" like. Window
manager traits are defined after keyword traits, inside of brackets that
contain objects affected and/or subtraits and values, thus:
Comments are defined by hash marks, as so:
A menu "function" is defined with a menu identifier and one or more traits,
or menu entries, like so:
Menu "Menu Identifier"
{
"Menu
Title"
f.title
"Executable
Name" !"ExecutableProgram &"
"Menu
Name"
f.menu "Menu Identifier"
"Restart
TWM" f.restart
"Quit..."
f.quit
}
An example for a root
menu would be:
Menu "DefaultRootMenu"
{
"Stigmata"
f.title
"Shell
Window" !"xterm &"
"Netscape"
!"netscape &"
"Lock
Screen" !"xlock
-nice 0 -mode pipes -batchcount 2 &"
"Screen
Save" !"xlock
-nolock -nice 0 -mode pipes -batchcount 2 &"
"Backgrounds"
f.menu "Backgrounds"
"Restart
TWM" f.restart
"Quit..."
f.quit
}
The "Color" trait has
several subtraits, such as "MenuTitleForeground", "TitleBackground", or
"IconManagerBackground":
Color
{
BorderTileBackground
"black"
BorderTileForeground
"green3"
IconBorderColor
"#444444"
MenuShadowColor
"#444444"
IconManagerBackground
"black"
IconManagerForeground
"#005088"
MenuBackground
"black"
MenuForeground
"green3"
MenuTitleForeground
"#005088"
MenuTitleBackground
"black"
TitleBackground
"black"
TitleForeground
"green3"
}
The IconManager
is a small box that contains "icons" that are really only
boxes with program names on them. Window
behavior can be controlled here, and
smallish bitmaps (not pixmaps) can be placed
and changed on a per-window basis.
Variable traits that
take "Affected things" are "AutoRaise", "IconManagerDontShow",
"DontIconifyByUnmapping", or "Notitle", to name
a few:
AutoRaise
{
"XTerm"
"Emacs"
"Netscape"
}
Additionally, the .twmrc takes single "Trait Value" options, such as "IconManagerGeometry",
"TitleFont", "IconManagerFont", "IconDirectory", "MenuFont", "BorderWidth",
and more:
IconManagerGeometry "100x100+0+0"
BorderWidth 3
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-*-*-*-*"
IconDirectory "/usr/include/X11/bitmaps"
Button bindings are done in a "Button= :where : function" format. The following
example defines which menus to use depending on which mouse button is clicked
on the root menu:
Button1=
:root : f.menu "DefaultRootMenu"
Button2=
:root : f.menu "XOperationsMenu"
Button3=
:root : f.menu "WindowOperationsMenu"
|