Book HomeLinux in a NutshellSearch this book

17.15. The FvwmWinList: Switching the Focus

The FvwmWinList is an fvwm2 module that lets you keep track of all the application windows on your many screen pages. Generally the WinList is configured to let you switch the focus to whatever window you want, but hypothetically you can set it up to perform other operations.

In many typical environments, you can start the FvwmWinList from an Fvwm Modules menu (often a submenu of the Root menu). If you'd instead like to configure fvwm to start the WinList automatically, see Section 17.15.2, "Making the FvwmWinList Part of Your Default Environment". (You might also configure a keyboard shortcut to start the WinList module; see Section 17.13, "Adding Keyboard Shortcuts " for details.)

Some of FvwmWinList's appearance and behavior can be customized. We'll see some typical module definition lines in the next section. If you are using this configuration, FvwmWinList performs the following operations:

First mouse button click:

Switch the focus to the window in question. If the window is iconified, deiconify. Switch the screen view so that the page with the window is displayed.

Second mouse button click:

Iconify/deiconify window; the page displayed does not change.

Third mouse button click:

Display a pop-up box containing information about the window in question (e.g., dimensions in pixels, whether it is sticky, permanent or transient, etc.). Pop down the box by clicking any mouse button on it.

One of the interesting features of the WinList is that none of these commands moves the pointer to the focus window. Instead, the pointer stays on the entry in the WinList that corresponds to the focus window.

Hypothetically you could simply keep the pointer on the FvwmWinList and do all of your navigation from there -- except when you want to work with the FvwmButtons module or another of the windows that don't normally appear in the WinList.

17.15.1. Using the FvwmWinList with Multiple Instances of the Same Window

The primary limitation of the FvwmWinList is that it's somewhat difficult to tell which window in the list is which. Each entry in the FvwmWinList gives the text that appears in the corresponding window's titlebar. (If the titlebar is suppressed, it gives the text that would normally appear.) If you tend to run the same program many times simultaneously -- e.g., several xterms -- on the FvwmWinList, they all look alike. (The one difference is that iconified windows have entries surrounded by parentheses.)

If you get attached to using the FvwmWinList, you should probably specify different titles for multiple instances of the same window. The standard X options -title or -name will do the trick. Note, however, that while -title changes only the text in the titlebar, -name literally changes the name of the application. Thus it affects how resources and configuration file parameters are assigned.

17.15.2. Making the FvwmWinList Part of Your Default Environment

If you want to make FvwmWinList part of your default environment, edit your configuration file to have it run at both initialization and restart of the window manager. In the following example, we've added lines three and six for these purposes:

AddToFunc InitFunction    "I" Module FvwmButtons
+           "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070
+           "I" Module FvwmWinList

AddToFunc RestartFunction "I" Module FvwmButtons
+           "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070
+           "I" Module FvwmWinList

These lines specify that the FvwmWinList module is run whenever you start or restart the window manager. The window appears in the bottom left corner of the screen.

As an alternative, you might make the FvwmWinList appear as a pop-up menu. The following definition binds the module to the third pointer button when it is held down on the root window (this may not be as handy as having the module present all the time):

Mouse 3         R       A       Module FvwmWinList Transient

But running a module is different than specifying how it looks and behaves. Like a number of other modules (FvwmButtonBox, FvwmPager, etc.), the various characteristics of the FvwmWinList are defined elsewhere in the configuration file. Here are some typical definition lines:

#########################FvwmWinList#########################
*FvwmWinListBack #908090
*FvwmWinListFore Black
*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinListAction Click1 Iconify -1,Focus
*FvwmWinListAction Click2 Iconify
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinListUseSkipList
*FvwmWinListGeometry +0-1

The first three lines specify the background color, foreground color, and text font used for the application. The next three define what actions first, second, and third mouse button clicks invoke when you do them within the WinList. UseSkipList tells the WinList not to list any windows that are assigned the Style classification WindowListSkip elsewhere in the configuration file. (Generally all module windows are classified thus and will not appear in the FvwmWinList.) The final line specifies the location at which the window should appear (bottom-left corner).

The WinList is also a sticky window; that is, it appears on every page on every desktop. But the configuration file can be confusing. This characteristic is specified elsewhere in the file, using the Style option:

Style "Fvwm*"       NoTitle, Sticky, WindowListSkip

This line specifies that all modules (including the WinList) have no titlebars, are sticky, and will not appear on the FvwmWinList. In the case of the FvwmWinList module, having it appear as an entry on itself would be more than a little confusing.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.

This HTML Help has been published using the chm2web software.