Re: FVWM: Question...

From: <jtl_at_cs.man.ac.uk>
Date: Thu, 13 Jan 2000 02:48:59 GMT

> From: "Thomas A. Gardiner" <gardiner_at_pas.rochester.edu>

> 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?

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
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Jan 12 2000 - 20:52:58 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:50 BST