home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeLinux in a NutshellSearch this book

17.9. Having Multiple Desktops

In order to work with multiple desktops, you simply have to configure the Pager to display the number of desktops you want. Each desktop will have the same number of pages, the number you've specified using DeskTopSize (see Section 17.8, "Changing the Size of the Desktop").

In order to specify more than one desktop, you'll need to edit a line that looks something like this one:

*FvwmButtons(2x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 0")

This line incorporates the Pager into the FvwmButtons module (the button bar). The two numbers at the end of the definition line give the range of desktops visible. The first desktop is number 0, and in this case the last desktop is also number 0 -- i.e., there is only one.

If you want two desktops, change the final number to a 1:

*FvwmButtons(1x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 1")

The following line would create a Pager with four desktops, numbered through 3:

*FvwmButtons(1x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 3")

Few people will require this much space. But even if you add only a single desktop, keep in mind that you may have to change the overall dimensions of the Pager, and thus of the button bar that contains it, in order to have a reasonably sized view of your various desktops. You may also have to reallocate the space you have so that the Pager gets a large enough area.

There are a few relevant sizes you can tinker with to make room for a Pager that shows multiple desktops:

  • The dimensions of the button bar (FvwmButtons module)

  • The number of columns the button bar is divided into

  • How many of those columns the Pager takes up

A typical FvwmButtons module might be 520 pixels wide and 100 pixels high:

*FvwmButtonsGeometry 520x100-1-1

And it might be configured as two rows and five columns (the sizes of which are entirely dependent on FvwmButton's geometry):

*FvwmButtons(Frame 2 Padding 2 2 Container(Rows 2 Columns 5 Frame 1 Padding 10 0))

In this particular setup, the Pager takes up a one-column by two-row section of the FvwmButtons module:

*FvwmButtons(1x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 1")

The Icon Manager takes up three columns:

*FvwmButtons(3x2 Frame 2 Swallow "FvwmIconMan" "Module FvwmIconMan")

And the remaining column is occupied by the desktop applications (e.g., xbiff, xclock, xload) that run within a Container in the FvwmButtons module:

*FvwmButtons(1x2 Frame 0 Container(Rows 2 Columns 2 Frame 0))
*FvwmButtons(Frame 2 Swallow(UseOld,NoHints,Respawn) "xbiff" 'Exec exec xbiff -bg
bisque3')
*FvwmButtons(Frame 3 Swallow(UseOld,NoHints,Respawn) "xclock" 'Exec exec xclock -bg
bisque3 -fg black -hd black -hl black -padding 0 update 1')
*FvwmButtons(2x1 Frame 2 Swallow(UseOld,NoHints,Respawn) "xload" 'Exec exec xload -bg
bisque3 -fg black -update 5 -nolabel')

Notice that the container is further subdivided into two rows and two columns so the applications can be laid out. But don't let this layer confuse you. (Parsing the configuration file can be exacting.)

Back to the issue of multiple desktops. If you want two desktops, first set that up by changing the number of the final desktop to a 1 at the end of this line:

*FvwmButtons(1x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 1")

Then to make the Pager big enough to display both desktops adequately, add some pixels to the width of the button bar. Here's an extra hundred from the 520 we started with:

*FvwmButtonsGeometry 620x100-1-1

And let's also reallocate the available five columns so that the icon manager takes up only two (rather than the three it started with), and give the extra column to the Pager. The section with the applications remains a single column wide:

*FvwmButtons(2x2 Frame 2 Swallow "FvwmIconMan" "Module FvwmIconMan")
*FvwmButtons(2x2 Frame 2 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 0")
*FvwmButtons(1x2 Frame 0 Container(Rows 2 Columns 2 Frame 0))

Figure 17-2 shows our new double desktop reflected in the updated button box. This is just one sample customization. With your individual needs and display specifics, you can imagine how complicated this can get. But it's easy to test your changes by simply restarting the window manager.

Figure 17-2

Figure 17-2. The modified FvwmButtons module shows two desktops in the Pager



Library Navigation Links

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











??????????????@Mail.ru