Dakkar's fvwm-crystal settings

I use a 2800x1050 desktop (two 20" LCD panels on a GeForce 6600), with a slightly modified version of the TopLine recipe. I also use a 5x5 pages virtual desktop, and a Dvorak keyboard with valume keys (mapped to the proper keycodes in X11). My music player is AmaroK, and my desktop manager is ROX.

Since my monitors can "pivot", I have further modified the recipe to handle rotating the displays. This needs help from the video card. See the section Rotating the displays.

The recipe

The main differences from the stock TopLine are:

The decoration

I have changed the Clearlooks DeepSky decoration to add a mini-icon as button 3.

The colorsets

Since I use tha Gentoo version of fvwm2, it has a patch that allow fake transparency in the menus. Thus, I changed the DarkDesktop and WhiteDesktop colorsets to use this feature.

The bindings

I redefined most keyboard bindings to my taste. Of particular interest may be the Music file, where I bind the volume controls to the volume keycodes, and the Music-GUI function to the "eject" keycode. I also bound most window manipulation functions to various combination of Alt and the numeric keypad (see the Window-Control-Dakkar file)

The preferences

To be able to select AmaroK as a music player, and amixer as a mixer control, I created the dakkar_Preferences file, which adds them to the appropriate menus.

The styles and icons

I added some style declaration and icons for some applications (e.g. the windows created by xine-ui and xpad should be bare, and I added icons for xchat-2 and skype)

The functions

I redefined a couple of function in the Numpad to add the AnyScreen option.

Then I wrote the Mixer-amixer and Music-amarok files to interact with by chosen music programs.

amixer is a simple command-line mixer, and its integration was easy.

AmaroK is a KDE application, and it's not straightforward to control. At the moment only "random", "repeat", "stop", "play/pause" and "show/hide" are implemented, all via dcop calls.

The Music-GUI function is used to toggle the display of AmaroK, and also to start it: it the dcop calls fails, the amarok command gets executed, launching the program.

Note

AmaroK and Trayer

For some not-really-clear-to-me reason, the tray icon of AmaroK is not displayed by Trayer, normally. To work around this problem, I have written the small amarok script, which sits in my ~/bin directory (which is at the beginning of my $PATH). Using this, the icon works as expected.

I also tweaked a Perl script I found on the Web to create a menu for my screen sessions, see the Screen-Menu configuration file and the fvwm-screen.pl script.

Finally, in the Notify file, I redefined the UrgencyFunc to pop up a notification via the dbus notification mechanism (using a simple Perl script which uses Net::DBus).

Rotating the displays

This takes a little background.

First of all, my /etc/X11/xorg.conf file has a Screen section like this:

Section "Screen"
  Identifier  "dual-nv"
  Device      "nvidia"
  Monitor     "LCD"
  DefaultDepth 24
  Option "TwinView" "true"
  Option "MetaModes" "DFP-0: 1400x1050 @1400x1050 +0+0, DFP-1: 1400x1050 @1400x1050 +1400+0"
  Option "RandRRotation" "on"
  Option "Xinerama" "on"

  SubSection "Display"
    ViewPort 0 0
    Depth    24
    Modes    "1400x1050"
  EndSubSection
EndSection

This specifies that, normally, I use my displays horizontally, one to the right of the other.

Then, in my ~/.xinirc, I add a second "MetaMode":

./bin/nv-control-dpy --add-metamode \
 'DFP-0: 1400x1050 @1400x1050 +0+1050, DFP-1: 1400x1050 @1400x1050 +0+0'

The nv-control-dpy program can be found in the source tarball for the nvidia-settings program, in the samples subdirectory.

You may be wondering: why adding a second MetaMode in this way, when you can specify both in the xorg.conf file? Good question. The answer is that, if you do it "the logical way", the always helpful NVidia drivers will tell the X server that you have a virtual screen whose size is the bounding box of the union of all MetaModes. Which in my case would mean that I'd have a lot of panning around, very irritating when you use multiple viewports. Adding the MetaMode after the startup of the X server avoids this issue.

In the recipe, I have two functions to set landscape (normal) and portrait (vertical) orientation. They call xrandr to set the display orientation and size, and do some repositioning of the various things that need it:

Maybe there's a samrter way to get the same result, but this works, and it only took an evening to set up.