Hi all, Someone recently asked me about the status of if-syntax in Fvwm. This inspired me to readdress an earlier patch I wrote (which was somewhat limited in scope & a bit buggy) to identify the issues & hack up a robust implementation.
This new patch: - ensures there are no race conditions b/w modules - allows nested if statements - allows if statements in functions - is very intuitive (IMO) - is not yet documented in the man page Some example syntax: # A simple if-statement. If Any ("xterm") Echo "An xterm session is running" Elsif Any ("rxvt") Echo "An rxvt session is running" Else Echo "No xterm/rxvt sessions running" EndIf AddToFunc ToBeOrNotToBe + I Echo "To be or not to be? That is the question ..." + I If ShellCmd uname -a | grep -q -i linux + I Echo "To be! :)" + I Else + I Echo "Not to be. :(" + I Endif Further examples are available at: http://users.tpg.com.au/users/scottie7/tmp/config.if Developers interested in this patch will probably want to read this thread: http://www.hpc.uh.edu/fvwm/archive/0108/msg00044.html To apply this patch, download: http://users.tpg.com.au/users/scottie7/tmp/if.patch & run: cd $fvwm_src_dir patch -p0 < if.patch make install Any comments/criticism most welcome. SCoTT. :) -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]