Subject: FVWM: Question...

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 12 Jan 2000 17:36:37 -0500 (EST)

Hi,

Sorry for asking what is probably a very simple question...

I want to simplify some junk in the AnotherLevel package and so am trying
to do something like this.

AddToMenu WindowManagers
+  ""	Title
+  "Fvwm2 Win95-decors" \
	Exec exec echo Fvwm95 > HOME/USER_WM_STYLE;  \
	Restart HOME/bin/RunWM
+  "Fvwm2 ... other decors

But of course it does not work.  Is there a simple way like this to
execute the two commands for a single menu selection?

If not, is there a way to execute one command dependent on what the user
selects from the menu and then execute a single default command 
(which is independent of the selection) in addition?

Thanks,
Tom

Ps. The file is M4 processed so things like HOME and USER_WM_STYLE get
filled in...

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

---

From: [email-masked]
Date: Thu, 13 Jan 2000 02:48:59 GMT

> From: "Thomas A. Gardiner" <[email-masked]>

> execute the two commands for a single menu selection?

You could try placing the commands inside a fvwm2 function, and call that:

	AddToMenu WindowManagers
	+  "" Title
	+  "Fvwm2 Win95-decors" Function RestartFvwm95
	+  "Fvwm2 ... other decors

	AddToFunc RestartFvwm95
	+ "I" Exec echo Fvwm95 > HOME/USER_WM_STYLE
	+ "I" Restart HOME/bin/RunWM

This technique was used in a more general way in AnotherLevel (before
/usr/X11R6/bin/RunWM came along) with a function called SwitchDecor in the
fvwm2rc.decors.m4 file:

	AddToFunc SwitchDecor
	+ "I" Exec echo $0 > HOME/USER_WM_STYLE
	+ "I" Restart $1

called from

	AddToMenu Decorations
	+ "Decorations" Title
	+  "FVWM 95"    Function SwitchDecor Fvwm95 FVWM_BIN_NAME
	+  "Lesstif WM" Function SwitchDecor Mwm FVWM_BIN_NAME
	+  "Afterstep" Function SwitchDecor Afterstep afterstep

As you have your own RunWm script, perhaps the best approach for you is this
compromise:

	AddToMenu WindowManagers
	+  "" Title
	+  "Fvwm2 Win95-decors" Function SwitchDecor Fvwm95
	+  "Fvwm2 Mwm-decors" Function SwitchDecor Mwm
	+  "Thingy Foo" Function SwitchDecor Foo
	+  "Whatsit Bar" Function SwitchDecor Bar

	AddToFunc SwitchDecor
	+ "I" Exec echo $0 > HOME/USER_WM_STYLE
	+ "I" Restart HOME/bin/RunWM

Regards, John Latham