Re: FVWM: Function with Parameter

From: Chris Rode <crode_at_iastate.edu>
Date: Fri, 28 Nov 1997 09:00:15 CST

sometime in the late 20th century, Vinay_Kumar uttered:

| AddToFunc Func-1
| "I" Desk blabla
| + "I" GotoPage blahblah
|
| It only executes GotoPage. But if I merge first two lines,
| (AddToFunc Func-1 "I" Desk blabla) it works properly.
| Any problem with my setup or Any Idea.

you need a '+' on the Desk line:

AddToFunc Func-1
+ "I" Desk blabla
+ "I" GotoPage blahblah

should work as expected....

| Also I want to make Functions with argument.
| Does fvwm2 support it?

i paste now from the fvwm2 man page (where it describes AddToFunc):

       The special symbols $w and $0 through $9 are available in the Complex-
       Functions or Macros, or whatever you want to call them. Within a
       macro, $w is expanded to the window-id (expressed in hex, i.e.
       0x10023c) of the window for which the macro was called. $0 though $9
       are the arguments to the macro, so if you call

            Key F10 R A Function MailFunction xmh "-font fixed"

       and MailFunction is

            AddToFunc MailFunction "I" Next [$0] Iconify -1
            + "I" Next [$0] focus
            + "I" None [$0] Exec $0 $1

       Then the last line of the function becomes

            + "I" None [xmh] Exec xmh -font fixed

so the answer to your last question is, "yes". :)

--chris.

--
"...we're flying high, we're watching the world pass us by...
 never want to come down, never want to put my feet back down
 on the ground..." -- depeche mode, "never let me down again".
--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Nov 28 1997 - 09:03:06 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST