Re: FVWM: Function to conditionally popup a window

From: Scott Smedley <scottie7_at_tpg.com.au>
Date: Thu, 27 May 2004 00:14:04 +1000

Hi Stuart,

: Therefore I need to write a function to invoke this app that
: checks if the 'factory' is running, and invokes it if it is not, and
: invokes the 'client' if the factory is running

This should work, but I haven't tested it:

AddToFunc FuncStartMGT
+ I Any (MGT*) Exec exec multi-gnome-terminal --use-factory
+ I None (MGT*) Exec exec multi-gnome-terminal --start-factory-server

: I'm considering using PipeRead to call a script that does a ps to check
: for an instance of multi-gnome-terminal, and that returns the applicable
: parameters

Yeah, that would work too:

PipeRead `if /sbin/pidof multi-gnome-terminal >& /dev/null ; then echo Exec exec multi-gnome-terminal --use-factory ; else echo Exec exec multi-gnome-terminal --start-factory-server ; fi`

SCoTTie! :)
--
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 May 26 2004 - 08:22:37 BST

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