「FVWM」 – 控制虚拟桌面

  CREATED BY JENKINSBOT

Desk arg1 [arg2] [minmax]

This command has been renamed. Please see GotoDesk command.

DesktopName desk name

Defines the name of the desktop number desk to name. This name is used in the WindowList command and in the FvwmPager where it override the Label configuration option. Moreover, if consecutive names starting from desktop 0 are defined, then these names can be used by any EWMH compliant application (as a pager).

DesktopSize HorizontalxVertical

Defines the virtual desktop size in units of the physical screen size.

EdgeResistance delayEdgeResistance scrolling moving [xinerama-scrolling]

Tells how hard it should be to change the desktop viewport by moving the mouse over the edge of the screen. The parameter tells how many milliseconds the pointer must spend on the screen edge before fvwm moves the viewport. This is intended for people who use

EdgeScroll 100 100

but find themselves accidentally flipping pages when they do not want to. If -1 is given as the delay, scrolling is disabled completely.

The second form of invocation with two or three arguments is obsolete and should be replaced with the following three commands as needed:

EdgeResistance scrolling

Style * EdgeMoveDelay scrolling

Style * EdgeMoveResistance moving

or

Style * EdgeMoveResistance moving xinerama-scrolling

Fvwm does this substitution automatically and prints a warning.

EdgeScroll horizontal[p] vertical[p] [wrap | wrapx | wrapy]

Specifies the percentage of a page to scroll when the cursor hits the edge of a page. A trailing ‘p’ changes the interpretation to mean pixels. If you do not want any paging or scrolling when you hit the edge of a page include

EdgeScroll 0 0

in your config file, or possibly better, set the EdgeThickness to zero. See the EdgeThickness command. If you want whole pages, use

EdgeScroll 100 100

Both horizontal and vertical should be positive numbers.

If the horizontal and vertical percentages are multiplied by 1000 or one of the keywords wrap, wrapx and wrapy is given then scrolling wraps around at the edge of the desktop. If

EdgeScroll 100000 100000

is used fvwm scrolls by whole pages, wrapping around at the edge of the desktop.

EdgeThickness 0 | 1 | 2

This is the width or height of the invisible window that fvwm creates on the edges of the screen that are used for the edge scrolling feature.

In order to enable page scrolling via the mouse, four windows called the “pan frames” are placed at the very edge of the screen. This is how fvwm detects the mouse’s presence at the window edge. Because of the way this works, they need to be at the top of the stack and eat mouse events, so if you have any kind of error along the lines of: “mouse clicks at the edge of the screen do the wrong thing” you’re having trouble with the pan frames and (assuming you do not use the mouse to flip between pages) should set the EdgeThickness to 0.

A value of 0 completely disables mouse edge scrolling, even while dragging a window. 1 gives the smallest pan frames, which seem to work best except on some servers.

2 is the default.

Pan frames of 1 or 2 pixels can sometimes be confusing, for example, if you drag a window over the edge of the screen, so that it straddles a pan frame, clicks on the window, near the edge of the screen are treated as clicks on the root window.

EwmhBaseStruts left right top bottom

Where left, right, top and bottom are positive or null integers which define bands at the edge of the screen. left defines a band on the left of your screen of width left, right defines a band on the right of your screen of width right, top defines a band on the top of your screen of height top and bottom defines a band on the bottom of your screen of height bottom. The unit is the pixel and the default is 0 0 0 0. These areas define additional reserved space to the reserved space defined by some ewmh compliant applications. This is used to compute the Working Area. See the Extended Window Manager Hints section for a definition of the Working Area.

EwmhNumberOfDesktops num [max]

This command is useful only for an ewmh compliant pager or taskbar (as kpager or kicker taskbar) and not for fvwm modules ( FvwmPager or FvwmIconMan). It causes a compliant application to consider at least num desktops (desktop 0 to desktop num-1). The optional argument max causes a compliant application to never consider more than max desktops. If max is 0 (the default) there is no limitation. The actual number of desktops is determined dynamically. It is at least num, but it can be d if there is a window on desktop d-1 (or if the current desktop is desktop d-1) and d is less or equal to max or max is null. Moreover, a compliant pager can ask to change num itself. This is accepted by fvwm only if this number is less than or equal to max or if max is null. Note that negative desktops are not supported by the ewmh specification. The default is 4 0.

GotoDesk [prev | arg1[arg2][minmax]]

Switches the current viewport to another desktop (workspace, room).

The command takes 1, 2, 3, or 4 arguments. A single argument is interpreted as a relative desk number. Two arguments are understood as a relative and an absolute desk number. Three arguments specify a relative desk and the minimum and maximum of the allowable range. Four arguments specify the relative, absolute, minimum and maximum values. (Desktop numbers can be negative). If a literal prev is given as the single argument, the last visited desk number is used.

If arg1 is non zero then the next desktop number is the current desktop number plus arg1.

If arg1 is zero then the new desktop number is arg2. (If arg2 is not present, then the command has no effect.)

If min and max are given, the new desktop number is no smaller than min and no bigger than max. Values out of this range are truncated (if you gave an absolute desk number) or wrapped around (if you gave a relative desk number).

The syntax is the same as for MoveToDesk, which moves a window to a different desktop.

The number of active desktops is determined dynamically. Only desktops which contain windows or are currently being displayed are active. Desktop numbers must be between 2147483647 and -2147483648 (is that enough?).

GotoDeskAndPage prev | deskxpageypage

Switches the current viewport to another desktop and page, similar to the GotoDesk and GotoPage commands. The new desk is desk and the new page is (xpage,ypage).

GotoPage prev | [options]x[p]y[p]

Moves the desktop viewport to page (x,y). The upper left page is (0,0), the upper right is (M,0), where M is one less than the current number of horizontal pages specified in the DesktopSize command. The lower left page is (0,N), and the lower right page is (M,N), where N is the desktop’s vertical size as specified in the DesktopSize command. To switch to a page relative to the current one add a trailing ‘p’ after any or both numerical arguments.

Possible options are wrapx and wrapy to wrap around the x or y coordinate when the viewport is moved beyond the border of the desktop.

To go to the last visited page use prev as the first argument. The GotoPage function should not be used in a pop-up menu.

Examples:

# Go to page (2,3)

GotoPage 2 3

# Go to lowest and rightmost page

GotoPage -1 -1

# Go to last page visited

GotoPage prev

# Go two pages to the right and one page up

GotoPage +2p -1p

Scroll [horizonal[p]vertical[p] | reverse]

Scrolls the virtual desktop’s viewport by horizontal pages in the x-direction and vertical pages in the y-direction or starts interactive scrolling of the viewport. Either or both entries may be negative. Both horizontal and vertical values are expressed in percent of pages, so

Scroll 100 100

means to scroll down and right by one full page.

Scroll 50 25

means to scroll right half a page and down a quarter of a page. The Scroll function should not be called from pop-up menus. Normally, scrolling stops at the edge of the desktop.

If the horizontal and vertical percentages are 100 or more and are multiplied by 1000 then scrolling wraps around at the edge of the desktop. If

Scroll 100000 0

is executed over and over fvwm moves to the next desktop page on each execution and wraps around at the edge of the desktop, so that every page is hit in turn.

If the letter ‘p’ is appended to each coordinate (horizontal and/or vertical), then the scroll amount is measured in pixels.

Without arguments or if the option reverse is given interactive scrolling takes place. The viewport scrolls as the mouse is moved. With the reverse option scrolling is done in opposite direction of the mouse movement, and without it scrolling in the same direction as the mouse.

The binding

Mouse 1 A CM Scroll reverse

gives an effect of grabbing and dragging the viewport with button 1 if Control and Meta is pressed.

Xinerama [bool]

Enables Xinerama support if the boolean argument is true and disables it if the argument is false. Calling this command without arguments turns on Xinerama support if it was disabled before and turns it off if it was enabled. For example:

# Turn Xinerama support on, use primary screen 2

XineramaPrimaryScreen 2

Xinerama on

# Turn it off again

Xinerama off

XineramaPrimaryScreen [primary-screen]

Takes an integer number or ‘g’ or ‘c’ as its argument. A number is taken as the number of the Xinerama screen that is to be used as the primary screen. The primary screen can be used as the preferred screen to place windows with

XineramaPrimaryScreen <screen number>

Style * StartsOnScreen p

The primary screen is used in some of the modules and for the default icon box too. Any number that is zero or more is taken as the primary screen’s number. Instead, the letter ‘c’ indicates to use the current screen (containing the pointer) whenever the primary screen is used. This may be very confusing under some circumstances. With ‘g’, the global screen is used as the primary screen, effectively disabling the primary screen. Calling this function with any other argument (including none) resets the primary screen to 0.

XineramaSls [bool]

For multi-screen implementations other than Xinerama, such as Single Logical Screen, it is possible to simulate a Xinerama configuration if the total screen seen by fvwm is made up of equal sized monitors in a rectangular grid. The XineramaSls command turns SLS support on or off or toggles it to the opposite state, depending on if the boolean argument is “True”, “False” or “toggle”. If no argument is given, this is treated like “toggle”. The default layout uses one by one screens. To configure the layout, use the XineramaSlsSize or XineramaSlsScreens command.

XineramaSlsSize Horizontal Vertical

This command configures the layout of the Single Logical screen feature. It takes two arguments, Horizontal and Vertical which must be an integer value dividing evenly into the total desktop width, and height. For an example with two monitors side by side which appear as one screen through the X-Server with the right screen as the primary screen, use:

XineramaSlsSize 2×1

XineramaSls On

XineramaPrimaryScreen 1

Xinerama On

XineramaSlsScreens number-of-screens [screen-spec …]

This command configures the layout of the Single Logical screen feature. Its first argument is the number of screens to use. It must be followed by exactly this number of screen-spec arguments. Each of these can be written either in standard X geometry format: “<width>x<height>+<x>+<y>” or as a space separated list of numbers: “x y width height”. Both ways of describing screens can be mixed in a single command. All four numbers must be supplied. The x and y values specify the origin of the screen in relation to the global screen’s origin while width and height specify the size of the screen in pixels. No checks are done if the geometries make sense, so it is possible to define overlapping screens (with random results) or screens that are not visible at all.

XineramaSlsScreens 3 \

512×768+0+0 512×300+512+0 512 300 512 468

XineramaSls On

XineramaPrimaryScreen 1

Xinerama On

参考文献

FVWM/Controlling the Virtual Desktop