Using the X Window System > Chapter 7 The Window ManagerFrames |
|
You can control the general appearance of the window frames in your environment with your personal resources specifications. Three aspects of the general appearance of window frames are under your control.
Additionally, you can control what parts of the frame are displayed. You can specify what frame components you want to appear on windows:
You can still access the functionality of any decoration you remove by binding its functions to mouse buttons or to key presses, as explained in “Mouse Button Bindings” later in this chapter. Table 7-1 Valid Window Frame Elements
You specify the clientDecoration and transientDecoration resources as a list of the frame elements. If the first element in the list is preceded by a plus (+) sign or has no sign preceding it, the window manager starts with no frame and assumes that the list contains those elements you want added. If the list begins with a minus (-) sign, the window manager starts with a complete frame and assumes that the list contains elements you want removed from the frame. For example, you may want a border with only a title bar and window menu button around a particular hpterm window started as hpterm -name hp850.
Or you could remove the title bar from all transient windows by adding the following line in your personal resources specification:
You can use any of the standard X11 colors listed in the rgb.txt file in /usr/lib/X11. to color frame elements. In addition, you can create your own colors using hexadecimal values (see "Color Resources" in chapter 5). The following table lists the individual elements of inactive and active window frames, and the resources that control their color, for mwm. The default settings provide a 3-D visual effect without you having to specify the exact colors for every frame element. Table 7-2 Window Frames Resources for a Color Display
For example, the following lines in the .Xdefaults file in your home directory give the window manager frame a maroon foreground and a gray background. The background color is used to generate colors for the top and bottom shadow elements so that a 3-D effect is achieved.
A pixmap can be used to create shades of colors. Each pixmap is composed of tiles. A tile is a rectangle that provides a surface pattern or a visual texture by "mixing" the foreground and background colors into a color pattern. Table 7-3 Tiling Window Frames with Window Manager Resources
The following table lists the acceptable values for pixmap resources: Table 7-4 The Values to Use for Tiling Window Frames
The following figure illustrates the valid tile values: A matte is a 3-D border just inside the window between client area and window frame. The following table lists matte elements and the resources that control their color. Table 7-5 Coloring Window Frames with Window Manager Resources
The values to use for tiling mattes are shown in “Tiling Window Frames With Pixmaps”. For example, you could place a different matte around all instances of hpterm and xterm windows by including the following lines in your personal resources specifications:
If mwm determines that the monitor is monochrome, and no color resources are specified for frame elements, mwm uses defaults appropriate for monochrome displays. Mwm*background and Mwm*activeBackground are set to White. The following table lists the frame elements, resources, and defaults for monochrome monitors. Table 7-6 Window Frame Resource Values for Monochrome Monitors
The sys.Xdefaults file contains a set of entries that provides a more attractive window shading for monochrome displays. These entries start with mwm_bw, and require that you start mwm with the name mwm_bw. To do this, edit the following line in .x11start:
to read:
You must restart X11 in order for this change to take effect. When you start the window manager with a new name, it will no longer see resources of the form mwm*resource. It will see the class resources Mwm*resource. |