Cameron Simpson's FVWM Setup

This is just a small page detailing my FVWM Window Manager setup.

My desktop is pretty spartan in appearance, but rich in functionality:
[dual LCD desktop screenshot, 2560x1024 PNG, 867k]
2560x1024 PNG, 867k
What you see above is actually two 1280x1024 LCD displays side by side as a single desktop using Xinerama on a Matrox G450 dualhead video card. The wallpaper is from Ryan Bliss' Digital Blasphemy wallpaper collection.

All my real work and web browsing etc takes place below the top 103 pixels of the display; the top area is reserved for controls and status monitors.

You can see in this screen shot:

Below these top level items are whatever windows I have open. In this instance: the editor window for this web page (a full height half screen aterm with no transparency running nvi), a transparent shell window in the directory holding this web page, then in the four quarters of the right hand display (clockwise from top left): a preview of this web page in Mozilla, a half height editor window open on my fvwmrc, a half height transparent shell window used to take this screen snapshot, and a half height aterm with the fvwm manual entry in it.

I don't hold with visual clutter like window titles, icons for hidden windows, cascaded or "shaded" windows, icons for widgets (eg CDROMs etc) and so forth. My layout is quite disciplined: windows are almost always quarter screen or full height half screen, occasionally full screen (for wide log listings or poorly designed web pages).

In consequence window manipulation is very easy. Most is keyboard driven. Alt plus the following keys do:

On double width Xinerama screens I add: The fixed locations means I never have to fiddle with alignment or aiming.

Desktops

Since no single screen is ever big enough I also use multiple desktops. I have 12 numbered desktops for random stuff (in practice I do particular things on particular desktops out of habit). I bind Alt-Fn1 to take me to desktop 1, Alt-Fn2 to take me to desktop 2, an so forth. Correspondingly, Shift-Fn1 pushes the current window to desktop 1 from whatever desktop I'm on, Shift-Fn2 pushes the current window to desktop 2, and so forth.

[named desktops menu] I also keep an arbirarily large list of named desktops for specific projects in my "Named Desktops" menu. This is maintained by my desktop script, which I generally call via the wrapper script "nd". So fto go to my "FVWM" project desktop I'd just go to that shell window at the top of my screen and type:

nd FVWM
or pull up the desktops menu with Alt-D and choose the "FVWM" entry. A new named desktop is made on the fly if the name is new. Correspondingly, there's a "push to desktop" menu to push a window to a nmed desktop, invoked by typing Alt-P over the window to be pushed.

Menus

Aside from the switch-to-desk and push-to-desk menus described above I also have the menus described below.

Most of my menus are automaticly generated on the fly using FVWM's DynamicPopUpAction facility which will run an FVWM command prior to popping up a menu. Generally that will be my "fvwm-menu" script with suitable arguments, which tears down the current menu definition and builds a new one with the right content, including the requirement to do this again next time the menu is popped up. fvwm-menu in turn called a specified command to emit the menu contents. See the AutoMenu function in my fvwmrc and the menu definitions immediately below it.

WindowList

[windowlist menu image] Instead of icons I use FVWM's built in WindowList menu, accessed by typing Alt-L anywhere. All the terminal have meaningful names for easy selection. They start with good names because I open editor and shell windows via my e or term scripts respectively, which set good initial window names. Shell windows keep their titles current by rewriting the title with my ttylabel script, called whenever I change directory.

Main Menu

[main menu image] Invoked by the left mouse button on the desktop root window or from the taskbar's "start" button, this provides broad access to most functions, generally via a submenu. Aside from the submenus, this does: The submenus include:

Screen Sessions

A list of my screen sessions, generated from my "fvwm-menu-scr script. Each item pops up a fresh aterm with that screen session in it. I use screen quite heavily for long running build sessions that I many want to monitor from elsewhere later, and also for email. The curious may want to see my logbuild script, which fires up a fresh ttylabelled aterm with a meaningfully named screen session inside it, with the shell within logged to my session logs, quite handy for later reference to how I built a particular application.

Window Lists

Various invocations of the FVWM WindowList showning particular sets of windows (this desktop, all desktops, so forth).

Window Ops

[winops menu thumbnail] This starts with the usual window operations: Raise, Lower, etc.

You will notice that most entries have keyboard equivalents beside them. This is because I've adopted the habit of adding key bindings only via an FVWM function with both defines the key binding and makes an entry in a menu for it with the key description as you see here. See the KeyFn function in my fvwmrc. In this way if I forget some obscure key combination I am guarrenteed still to be able to access it from a menu.

Image Browser

[image browser menu] This is an autogenerated menu that browses my personal stash of images, used for wallpaper, menu backdrops etc. This is not as simple as the other menus because it make a distinct menu from each subdirectory. To this end the function PopImDir is defined in the fvwmrc, which takes two arguments: a starting directory and a command to run when a particular image is actually selected. The image browser menu just runs up "xv" for the selected image but there are other menus that set the root or menu backdrop from it, and arbitrary other things could be done.

The PopImDir function defines a menu by reading from fvwm-menu and then pops it up. Fvwm-menu in turn calls fvwm-menu-imlist with the directory and image selection command as arguments.

Fvwm-menu-imlist is a little complicated. It first generates menu entries to run itself on the parent directory and any subdirectory. Then for each image it checks to see if there's a thumbnail present. If there isn't, a background job is dispatched to make it because waiting for this in a large directory is very tedious. Regardless, a menu entry is made for each image that uses the thumbnail if present. In this way there probably will be thumbnails on subsequent visits.

Tools Menu

Just an assortment of tools: terminals, email, etc.

Web Menu

[web menu image] This contains:

X11 Menu

[x11 menu image]

Configuration Menu

[config menu image]

All Menus

[all menus menu image] As with my key bindings, I create menus via an intermediate NewMenu FVWM function. This adds a hook to each menu to this menu-of-menus menu. Ever get lost in a tree of menus? This is a way out for that obscure menu you can't find.