Subject: FVWM: Li'l hack o' the day

From: Kai Grossjohann <[email-masked]>
Date: 23 Apr 1996 17:09:07 +0200

Hi there,

maybe this is simpleminded and all of you can do this much better in
three seconds than I can in three hours, but anyway ... here goes.

I use the following A LOT.  It lets me choose a window with a specific
name.  I use the mostly for xterms where I put the host name into the
window title.  Nice alternative to the window list for a keyboard
oriented person like me.

Here's the part that goes in the module specification, most of it
shamelessly stolen from that example in system.fvwmrc:

##########################FvwmForm#Select#Window########################
*SelWinWarpPointer
*SelWinFont         *helvetica*m*r*n*14*
*SelWinButtonFont   *helvetica*m*o*n*14*
*SelWinInputFont    *cour*m*r*n*14*
*SelWinFore         Black
*SelWinBack         Light Gray
*SelWinItemFore          Wheat
*SelWinItemBack          Gray50
# begin items
*SelWinLine         center
*SelWinText         "Select Window"
*SelWinLine         center
*SelWinText         "Pattern:"
*SelWinInput        WinPat  20   ""
*SelWinLine         expand
*SelWinButton       quit "Go"        ^M
*SelWinCommand      Next [*$(WinPat)*] Function GoThere
*SelWinButton       restart   "Clear"
*SelWinButton       quit "Cancel"  ^[
*SelWinCommand Nop

Here's the part that assigns a key (should actually come first in
.fvwm2rc):

# name          context modifier action
Key g           A       3       Module FvwmForm SelWin

On my Sun Type 5 keyboard that means Alt-g pops up the window.

Oh, and there's the function GoThere:

# choose this version if Focus groks arguments (2.0.42 and up?)
AddToFunc GoThere               "I" Iconify -1
+                               "I" Focus 50 50

# choose this version for old -style Focus commands
AddToFunc GoThere               "I" Iconify -1
+                               "I" Focus
+                               "I" CursorMove 3 3

Is this worth an example in example.fvwmrc?
Is there a way to make this case-insensitive?

kai
--
There ain't no cure for the summertime blues.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].