Guide to X11/Window Managers/twm

Tab Window Manager
The Tab Window Manager is a configurable re-parenting window manager that provides title bars, shaped windows and icon management.

History
The Tab Window Manager was developed by Tom LaStrange and is the traditional window manager for the X Window System. It was originally called Tom's Window Manager, but was later renamed as the Tab Window Manager by the X consortium, who took over its maintenance.

The Tab Window Manager has been largely superseded by other window managers and is no longer maintained. Despite being obsolete, it has made a strong impact on the development of X window managers and its source code is often used as a base for other window managers.

The Tab Window Manager is used as a reference implementation and many window managers, such as ../swm/, ../vtwm/, ../tvtwm/, ../ctwm/, and ../fvwm/, and various derivatives, are built from the Tab Window Manager code.

Features of twm

 * A stacking window manager
 * Written in C
 * Uses /xlib/ directly
 * opensource and freely available
 * No /menubar/: the application menu is accessible by clicking the window background and holding the mouse button down.
 * Lightweight - Has few dependencies

Small Footprint
Some users still use the Tab Window Manager because it is simple, customizable, and has a small footprint and has a lightweight load on system resources. The Tab Window Manager is written in C directly against /xlib/ rather than using an X /toolkit/.

Using twm
When first starting twm, a user may only see an empty screen with a grayscale pattern. Some distributions launch an xshell or an actual terminal program in the background, which means that either of these run at the start of X and twm (or some other window manager).

Menus
Menus for programs and window manipulation work by clicking on the desktop with either the main or middle pointer button, holding the button down and then dragging through the menu and its submenus until a desired program or function is selected &mdash; the user then releases the pointer button off the item to select an action.

The Main Menu can be accessed with the primary pointer button (usually the left mouse button). This menu's first item is the operating system submenu, which lists all apps by their category submenus. The next two commands show and hide the Icon Manager, which is a UNIX-world taskbar precursor (twm was developed in 1987). The Icon Manager lists program windows in order they were run and allows raising or iconifying said windows.

The Window Ops menu can be invoked by clicking on the desktop with the middle pointer button. There, a user must choose a window manipulation function and then click on the desired window or its title.

Wheel mice typically have a separately clickable wheel; If touchpads only feature two buttons, then the middle button can be right at where the two buttons meet in the middle. If there are only two buttons, then X allows "simulating" the middle pointer button by letting the left and right buttons be clicked simultaneously (depending on X configuration for the pointer). If the functionality of your pointing device is different enough, consult its documentation.
 * Where and how to click the third pointer button

Launching applications
At invoking a program, twm will show skeleton crosshairs for the program's window. The crosshair grid follows pointer movement and the user must select a desirable position for the window with the pointer and click on the pointer button to have the window contents rendered. This is standard behaviour for twm.

To avoid having to move the pointer and click its button to set the location when launching some programs, a user can manually set window geometry for the program. This has been observed not to work with Mozilla Firefox and Wine.

Caveats
By default, classic implementations of twm omit window closing buttons in windows' title bars, which forces users new to twm to learn every which way how to close an application in there. This is in following the philosophy around X, whereby programs' visual toolkit choices are not set in stone by the underlying graphical framework.

To add a window closing button, see below.

Configuration
Much useful information about configuring twm can be found in twm's man page. This article section concentrates on some important practicalities.

.twmrc
twm's configuration file, depending on where it's at, is named or suffixed  and is located in two places.

The global configuration file is  and twm may defer to it in case a local file is not present. can be at  (in case of XFree86), it can also be at. The global file also contains menu hooks to applications and programs created by the system. In general,  should not be edited.

The local configuration file is  and is located in the home directory of a user (at  ). When first starting twm, the local configuration file might not be present. The local configuration file, once in the user's home directory, cannot be empty, because twm will only refer to that and will thus reflect the config file's emptiness by lacking a proper menu.

A half-solution is to copy the global file to the user's home directory and rename it to  &mdash; This will also provide application menu hooks, yet after installing new programs, the local menu file won't be updated and the user must add commands to access newly-installed applications on his/her own. Since the global menu file  is still updated by the system after installing a new package, a user can copy commands of new apps from there into their own   file.

Closing program windows in twm
By default, there are no window close buttons in twm. A user can choose to do some of the following: Button3 = : title : f.delete Mouse buttons are ordered thus: the left mouse button is, the middle button is   and the right one is  , which by default isn't assigned to anything when clicking the window's titlebar. The  specifies that a function be applied to when a titlebar is clicked. can close a program's secondary window or send a non-forceful exit signal to an application. RightTitleButton "xlogo11" = f.delete This adds the X logo to the right of the title bar; an example of this can be seen in the screenshot.
 * Specify an unused mouse button to close the window by clicking on its title bar:
 * Add a close button to windows' titlebars:

is a pixmap file located in XFree86 at  &mdash; which is the default pixmap location twm seeks out. The above  directory contains tens of other pixmaps a user can use in configuring twm.

Dependencies
twm is dependent on the following xlib libraries:


 * libx11-6
 * libxext6

used
VIRT  RES     SHR     %CPU    %MEM 3544  1808    1324    1.3     0.5