Scrollbox Fvwm config [update 6]

First of all, a screenshot:
imageshack.us/photo/my-images/19 … x800s.png/

This is my first Fvwm config, and will probably be my only one. I wrote it with the help of the Zensites tutorial… I wanted a theme that was unintrusive, and complemented whatever GTK themes I used it with. Oh, and allowed me to scroll around the virtual desktop space in increments. It uses a single 3x3 workspace with 15 EdgeScroll on all edges. Also, the keybindings should be pretty sane; most of them use the Win key.

This config is somewhat dependent on using Debian or Ubuntu, since it uses the menu and symlinks; otherwise it’s not dependent on any particular distro. It uses dmenu for general purpose launching, slock to lock the screen, and feh to set the background. All of that should be easily changeable.

So, without further ado, here is the configuration:

### For the Debian menu ###
Read /etc/X11/fvwm/menudefs.hook Quiet

### Virtual desktops ###
DesktopSize 3x3
DesktopName 0 DeskOne
DesktopName 1 DeskTwo
DesktopName 2 DeskThree
EdgeScroll 100 100 # scroll 100% at page edges
EdgeResistance 150 # plenty of scroll resistance
EdgeThickness 1 # Single pixel edges

### Global style options ###
OpaqueMoveSize unlimited
Style * ResizeOpaque
CursorStyle MENU left_ptr
CursorStyle TITLE left_ptr
CursorStyle DEFAULT left_ptr
DefaultColors White Black
DefaultFont "xft:Sans:bold:size=8:antialias=True"

### Colorsets ###
Colorset 3 fg Gray, bg Black # Main
Colorset 4 fg White, bg Black # Highlight
Colorset 5 fg Darkgray, bg Black # Inactive
Colorset 6 fg Gray, bg Gray # Window borders

### Window styles ###
Style "*" Font "xft:Sans:Bold:size=9:antialias=True"
Style "*" IconFont "xft:Sans:Bold:size=9:antialias=True"
Style "*" IconBackgroundRelief 0
Style "*" IconTitleRelief 0
Style "*" Colorset 3
Style "*" HilightColorset 4
Style "*" BorderColorset 6
Style "*" HilightBorderColorset 6
TitleStyle -- Flat
BorderStyle Simple -- NoInset Flat
Style "*" BorderWidth 1, HandleWidth 1
ButtonStyle 2 SGradient 12 Black Red -- Flat
ButtonStyle 4 SGradient 12 Black Green -- Flat
ButtonStyle 6 SGradient 12 Black Yellow -- Flat

### Menu styles ###
MenuStyle * MenuColorset 3
MenuStyle * ActiveFore White
MenuStyle * BorderWidth 1
MenuStyle * Font "xft:Sans:Bold:size=9:antialias=True"
MenuStyle * Hilight3DOff
MenuStyle * TrianglesSolid

### Startup Functions ###
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Exec sh ~/.fehbg # Restore the wallpaper with feh
+ I Module FvwmPager 0 2

### Misc Functions ###
DestroyFunc RaiseOrMove
AddToFunc RaiseOrMove
+ I Raise
+ M Move

DestroyFunc RaiseOrResize
AddToFunc RaiseOrResize
+ I Raise
+ M Resize

DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I PipeRead "xwd -silent -id $[w.id] | convert -scale 128x128 -frame 1x1 \
    -mattecolor black -quality 0 xwd:- png:$[HOME]/.fvwm/icon.tmp.$[w.id].png \
    && echo WindowStyle IconOverride, Icon $[HOME]/.fvwm/icon.tmp.$[w.id].png, StaysOnBottom \
    || echo Nop"
+ I Iconify

DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I Raise
+ M Move
+ D DestroyWindowStyle
+ D Exec exec rm -f $HOME/.fvwm/icon.tmp.$[w.id].png
+ D Iconify Off


### Key Bindings ###
# Keys for running stuff
Key p A 4 Exec dmenu_run -i
Key l A 4 Exec slock
Key Return A 4 Exec x-terminal-emulator
# Win+Tab -> window list, for convenience
Key Tab A 4 WindowList root c c NoDeskSotre, SelectOnRelease Super_L
# Keys for manipulating windows
Key q A 4 Close
Key m A 4 Maximize 95 95
Key i A 4 Thumbnail
Key b A 4 Lower
Key r A 4 Raise

### Mouse bindings ###
Mouse 1 2 A Close
Mouse 1 4 A Maximize 95 95
Mouse 1 6 A Thumbnail
Mouse 1 I A DeThumbnail
Mouse 3 I A Lower
Mouse 1 ST A RaiseOrMove
Mouse 1 F A RaiseOrResize
Mouse 3 STF A Lower
Mouse 3 R A WindowList
Mouse 1 R A Menu RootMenu
# Winkey mouse bindings
Mouse 1 W 4 RaiseOrMove
Mouse 3 W 4 RaiseOrResize

### FvwmPager ###
Style FvwmPager Sticky, !Title, !Handles, WindowListSkip, \
	FixedSize, FixedPosition
*FvwmPager: Geometry 400x100-0-0 
*FvwmPager: Rows 1
*FvwmPager: Columns 3
*FvwmPager: Font "xft:Sans:bold:size=8:antialias=True"
*FvwmPager: Fore Darkgray
*FvwmPager: Back Black
*FvwmPager: Hilight White
*FvwmPager: WindowColors Black Gray Black Gray

### Menus ###
# To prevent accidental quitting!
DestroyMenu QuitMenu
AddToMenu QuitMenu "Really quit?" Title
+ "Restart" Restart
+ "Quit" Quit
# The main menu
DestroyMenu RootMenu
AddToMenu RootMenu "Fvwm" Title
+ "Terminal" Exec x-terminal-emulator
+ "Browser" Exec x-www-browser
+ "Debian" Popup /Debian
+ "" Nop
+ "Fvwm" Popup QuitMenu

Currently it’s working fine for me. The only real issue to speak of is the ugly appearance of the window buttons and menu arrows, which I’d like to make a solid color… I’ll see if I can fix that later.

Edit: also it would be cool if I could figure out some way to implement mini-windows, preferably using Imagemagick. I’ll work on it.

Update: Buttons are now pretty concentric-gradient affairs, and menu arrows are solidly colored. Boo ya.

Update 2: Made the gradient buttons nicer looking square ones, and got rid of the ugly light green.

Update 3: Added Tavis Ormandy’s Thumbnail and DeThumbnail functions.

Update 4: Changed Iconify keybinding to use Thumbnail function.

Update 5: Added browser menu entry, tweaked scrolling, and made it possible to move, raise, and lower thumbnails.

Update 6: De-uglified the geometry window, and added a pager. Also scrolling has been changed to be less annoying; it now scrolls a full page, as per Fvwm defaults. You can still use the pager to scroll an arbitrary distance though (by right-clicking and dragging).