Subject: FVWM: Goto a specific desk-pageA

From: David Wren-Hardin <[email-masked]>
Date: Wed, 26 Nov 1997 15:21:30 -0800 (PST)

Here's a sorta trivial question, but one I can't seem to get to work.

I have two desks, each 2x2. I want to be able to move to a specific page
on a specific desktop using the function keys and shift. So if I hit F1
it'd put on on page one of desk one, F2 page two of desk one, F3 page
one of desk two, etc. Here's what I've tried:

Key F1		A	S	Desk 0 0,GotoPage 0 0
Key F2		A	S	Desk 0 0,GotoPage 1 0
Key F3		A	S	Desk 0 1,GotoPage 0 0
Key F4		A	S	Desk 0 1,GotoPage 1 0
Key F5		A	S	Desk 0 0,GotoPage 0 1
Key F6		A	S	Desk 0 0,GotoPage 1 1
Key F7		A	S	Desk 0 1,GotoPage 0 1
Key F8		A	S	Desk 0 1,GotoPage 1 1

While the Desk command works, I move to the proper desk, the
GotoPage part doesn't get acted on. What's the proper way to bind
multiple commands to a function key?

David Wren-Hardin 		| I have discovered that all human evil comes
[email-masked]	| from this, man's being unable to sit still
http://weber.u.washington.edu	| in a room.
      /~dwrenhar/              	|          -Blaise Pascal

--
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].

---

From: [email-masked] (A.J.vanWerven)
Date: Thu, 27 Nov 1997 08:54:54 +0100 (MET)

> multiple commands to a function key?

Try making functions for this.
Something like:

Key Blablabla Func-1

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

It might not be the most elegant solution, but it should work.

CIAO di Al Grandi.

--------------------------------------------------------------------------

God is real, unless declared integer.

A. van Werven
Dept. of Computer Science, Leiden University, The Netherlands
Phone: +31 6 54212683
E-mail: [email-masked]
URL: http://www.wi.leidenuniv.nl/~avwerven

---

From: [email-masked] (Vinay_Kumar)
Date: Fri, 28 Nov 1997 20:16:41 +0530 (IST)

> > multiple commands to a function key?

	Yeap, It works. But with slight modification. If I write 

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.

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

-- 
Vinay Kumar
Software Engineer,		Phone : 91-124-343703 (2224)
Hughes Software Systems,	email : [email-masked]
Gurgaon, India

---

From: Chris Rode <[email-masked]>
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: David Wren-Hardin <[email-masked]>
Date: Fri, 28 Nov 1997 09:45:48 -0800 (PST)

> 	Any problem with my setup or Any Idea.

This is what I found too, that the first way only seems to bind the
second part of the AddToFunc, while if you do it your way it works.

In any event, it works for me now, so thanks everyone!

David Wren-Hardin 		| Now some people say that you shouldn't 
[email-masked]	| tempt fate...But I never learned nothing
http://weber.u.washington.edu	| from playing it safe, I say fate should 
      /~dwrenhar/              	| not tempt me. -Mary-Chapin Carpenter.