On 02/08/07, Jason Dobies <[EMAIL PROTECTED]> wrote:
> > Do you per desk bindings?  You want something like this:
> >
> > DestroyModuleConfig a:*
> > *a: new_page "Silent MapKeyBindings-$$[desk.n]"
>
> Can you explain what these two lines do? I'm guessing this is the hook
> to call my mapping function and passing in the current desktop, I just
> wanted to make sure.

Yes, essentially.  Except of couse:

DestroyModuleConfig a:*

Clears any previous module alias whose name is 'a'.

*a: new_desk "Silent MapKeyBindings-$$[desk.n]"

Creates an alias for FvwmEvent (because we tell FvwmEvent the alias to
use) to listen on a change of desk and to run the command listed.  In
this case what will happen is:

MapKeyBindings-$$[desk.n]

Is expanded out by FVWM to give you the current desk number, hence if
you were on desk 1, FVWM would see:

MapKeyBindings-1

FVWM then looks for this function to call.  The reason why I'd
prefixed that with the Silent is because I didn't want to see any
error messages for the case where a specific desk, didn't have a
MapKeyBindings function defined, for example.

-- Thomas Adam

Reply via email to