* calmar <[EMAIL PROTECTED]> 15. Feb 04:
> Tavis Ormandy <[EMAIL PROTECTED]> writes:
> > On Sun, Feb 15, 2004 at 05:16:45AM +0100, calmar wrote:
> > Someone asked a similar question a couple of months ago, Mikhael offered
> > an interesting solution:

'Someone' was me, meanwhile I use and love it.  Thanks again to Mikhael.
And thanks to this great window manager.

> Yeah, really interesting. I will copy this for (maybe) later
> use. Actually I'm quite happy with the idea of opening a menu and
> then select is with a simple keystroke.

Maybe somebody can use (or improve) this.  As advised in this posting I
use two functions to bind/unbind keys on demand.  But I did not like the
idea of maintaining two list of keys, so I PipeRead them from a separate
file:

 DestroyFunc ExecCommand
 AddToFunc   ExecCommand
 + I PipeRead 'awk \'/^[^#$]/{printf "%s %s %s %s -\\n", $$$1, $$$2, $$$3, $$$4;}\' 
$HOME/.fvwm/fvwm2rc.keys2nd'
 + I Key Escape  A A -
 + I $*
 
 DestroyFunc ReadyCommands
 AddToFunc   ReadyCommands
 + I PipeRead 'awk \'/^[^#$]/{printf "%s %s %s %s ExecCommand", $$$1, $$$2, $$$3, 
$$$4; for(i=5; i<=NF; i++) printf " %s", $$i; p
 + I Key Escape  A A ExecCommand Nop
 
 Key M A C ReadyCommands

I use C-M to introduce my command (m as in fvw*m*[1]).  The
fvwm2rc.keys2nd uses standard fvwm key binding syntax, eg:

 # page movement
 Key h           A       S               GotoPage -1p 0p
 Key k           A       S               GotoPage 0p -1p
 Key l           A       S               GotoPage 1p 0p
 Key j           A       S               GotoPage 0p 1p
 Key m           A       A               GotoPage prev
 
 # desktop movement
 Key 0           A       N               GotoDesk 0 0
 Key 1           A       N               GotoDesk 0 1
 Key 2           A       N               GotoDesk 0 2
 Key 3           A       N               GotoDesk 0 3
 Key 4           A       N               GotoDesk 0 4
 Key 5           A       N               GotoDesk 0 5

HTH,
 regards, Frank.
===footnotes===
[1] In fact, m is the only letter in fvwm on the right side of the
keyboard.  The whole left side is 'reserved' for menu movement, the
right side I use for GNU screen (and alike) strokes.
-- 
Sigmentation fault
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to