Hi,

I have made a patch for FvwmScript. Now It's possible to change the window title by means of
a new set of instructions or using the SendToModule command.

The new instructions are:

ChangeWindowTitle {string}:      Changes the window title to the string passed as argument.
ChangeWindowTitleFromArg numarg: Changes the window title to the value of the "numarg"
                                 argument of the script.

The new functionality added to SendToModule:

SendToModule fvwmScriptName ChangeWindowTitle newTitle [oldTitle]

The optional argument oldTitle makes sense when you have several instances of
the same script. It permits you to avoid the change of the name of all that instances
by specifying the name of the window associated to the target script (see the examples
below).

With that functionalities you can reuse a fvwmscript, doing things like this:


DestroyFunc StartFvwmScriptAndMove
AddToFunc StartFvwmScriptAndMove
+ I FvwmScript $3
+ I Wait $0
+ I All ($0) Move $1 $2

AddToFunc StartFunction
+ I StartFvwmScriptAndMove FwmStorageHda -0 -0 "FvwmStorage FvwmStorageHda /dev/hda"
+ I StartFvwmScriptAndMove FwmStorageHdb -0 -30p "FvwmStorage FvwmStorageHdb /dev/hdb"

Where FvwmStorage takes the new name of the window from its first argument and looks
like this:

WindowTitle {FvwmStorage}
...

Init
   ChangeWindowTitleFromArg 1
...


or something like this:

+ I Module FvwmScript /root/fvwm25/FvwmStorageSend "/dev/hda6"
+ I Wait FvwmStorageSend
+ I SendToModule /root/fvwm25/FvwmStorageSend ChangeWindowTitle HDA6
+ I Module FvwmScript /root/fvwm25/FvwmStorageSend "/dev/hda1"
+ I Wait FvwmStorageSend
+ I SendToModule /root/fvwm25/FvwmStorageSend ChangeWindowTitle HDA1 FvwmStorageSend

Without the FvwmStorageSend argument in the last case, the SendToModule command would
have changed to HDA1 the name of the two instances of FvwmStorageSend.

I want to thank Thomas Adam for suggesting me to add the SendToModule stuff and
his help.

The patch can be downloaded from http://usuarios.lycos.es/staufway/patch-fvwmscript-2.5.18.gz

To apply the patch:

$ cd fvwm-2.5.18/modules
$ patch -p0 </path/to/patch-fvwmscript-2.5.18

It should work with the latest cvs version, although I still haven't tested it.

Best Regards!

Reply via email to