Re: FVWM: QuitFunction

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Tue, 13 Aug 2002 12:19:22 +0000

On 13 Aug 2002 13:12:01 +0200, Remko Troncon wrote:
>
> I'm not saying that i _really_ need it, because as you said before, it
> can be moved out of fvwm inside a wrapper. But now that i read the
> manual more thoroughly, i get your point on needing Pre-restart
> functions. I had the impression that the functions were organized this
> way (which they aren't):
> - InitFunction: called upon initialization only
> - QuitFunction (doesn't exist): called when the user quits only
>
> - StartFunction: called after InitFunction (when initing) or
> after RestartFunction (when restarting)

I know 2 reasons for StartFunction to be first and one reason for it to be
second.

> - RestartFunction: called before QuitFunction (when quitting) or
> before StartFunction (when restarting)

But then RestartFunction would be run twice.

> My intuition behind this was that, things you want to do before a restart
> (RestartFunction) and after a restart (StartFunction) , you also want
> to do before quitting and after initing respectively.
>
> I hope this makes any sense to you at all ;)

Now when I think about this, I see an elegant solution for these problems.
We only need 2 functions (not including Session*Function variants),
StartFunction and ExitFunction.

StartFunction may include conditions "StartUp" and "Restart", ExitFunction
may include conditions "Restart" and "Quit", these conditions are always
false anywhere else. This way InitFunction and RestartFunction are not
needed (not that RestartFunction is needed now anyway).

  AddToFunc StartFunction
  + I ModuleSynchronous FvwmPerl
  + I On (StartUp) FvwmBanner
  + I On (Restart) Exec play /some/dong.au
  + I FvwmButtons
  + I Exec xterm ...
  + I Wait
  + I Exec mozilla
  + I On (StartUp) Exec xplanet-runner
  + I FvwmPager

  AddToFunc ExitFunction
  + I On (Quit) Exec killall xplanet-runner
  + I On (Restart) Exec play /some/ding.au
  + I Echo "Either Restart or Quit"

I don't know whether it is more intuitive or not.

Regards,
Mikhael.
--
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 Tue Aug 13 2002 - 07:20:35 BST

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