Monday, July 17, 2006

FVWM Fun!

Terminal Menu List

When I find that I'm frequently doing something like opening a terminal, then sshing into a specific machine, I'll usually add it to my terminal quick menu.

Key T           A       M       Menu MenuTermList
DestroyMenu MenuTermList
AddToMenu MenuTermList
+ "Terminal" Exec exec urxvt
+ "chibox" Exec exec urxvt -e ssh chibox
+ "joelapenna.com" Exec exec urxvt -e ssh joelapenna.com
+ "dexter" Exec exec urxvt -e ssh -fN dexter
+ "Python" Exec exec urxvt -e python2.4-ipython

I used to have Key T dedicated to opening a terminal window. I changed it up so that I am presented with a menu of different terminals I can start. This is so I can do something like: Alt+T,t and start a regular xterm; or Alt+T,p and start an ipython session. Say I wanted to add another menu option to the pop-up, opening a root window for example:

+ "Root" Exec exec urxvt -e su -

VIM keybindings

I use vim, so I'm used to the hjkl keybindings for fvwm too.

key h A M GotoPage -1p +0p
key j A M GotoPage +0p +1p
key k A M GotoPage +0p -1p
key l A M GotoPage +1p +0p

This says move down with j, left with l, h with right, and up with k.

Koolade man alt+tab

DestroyFunc WindowListFunc
AddToFunc   WindowListFunc
+ I WindowShade False
+ I Iconify off
+ I FlipFocus

Don't move the mouse cursor when I alt+tab to a window. I like my cursors moving around without my permission about as much as I like my kool-ade wearing tights. WindowListFunc is the function that deals with responding to an alt+tab selection.

Because using a mouse is so 1999

Key V           A       CM      FuncPasteXBuffer
DestroyFunc FuncPasteXBuffer
AddToFunc FuncPasteXBuffer
+ I Current (!HasPointer) WarpToWindow 50 50
+ I FakeClick press 2 wait 10 release 2

Fake a middle click via keypress. Press middle button, wait 1/10th of a second, release middle button.

Pretty Wallpapers

Colorset 10 TiledPixmap $[fvwm_wp]0.png
Colorset 11 TiledPixmap $[fvwm_wp]1.png

DestroyModuleConfig FvwmBacker: *
AddToFunc StartFunction I Module FvwmBacker

*FvwmBacker: RetainPixmap
*FvwmBacker: Command (Desk 0, Page * 0) Colorset 10
*FvwmBacker: Command (Desk 0, Page * 1) Colorset 11

I can't make up my mind about which wallpaper I want to use, so instead I have two wallpapers. One for the top row of my desktop and another for the bottom row. The Colorset lines allow fvwm to keep the pixmap of the background in memory so that its just a bitflip to show the wallpaper when you cange pages instead of a reload. . . . MUCH FASTER.