On 02 Jun 2006 14:34:31 +0000, Mikhael Goikhman wrote:
>
> On 02 Jun 2006 15:48:14 +0200, Petr Vopalensky wrote:
> >
> > is there any possibility to automatically place a new window
> > next to another already opened window with some space
> > (e.g. 2px) between these two windows? Thanks in advance.
>
> There is no way to have user-defined gaps between windows, not that
> I know about.
On the other hand, if you speak about a specific window those coordinates
are known ($[w.x], $[w.y], $[w.width], $[w.height]), then you may use
the answer from FAQ 3.18 to Move a newly appeared window to a calculated
position. Something like this:
KillModule FvwmPerl
FvwmPerl --export
DestroyFunc PlaceNewWindowAtTheRight
AddToFunc PlaceNewWindowAtTheRight
+ I Pick Eval $a{x} = $[w.x] + $[w.width] + 2
+ I Pick Eval $a{y} = $[w.y]
+ I Exec $1
+ I Wait $0
+ I . Next ($0) Move %{ "$a{x}p $a{y}p" }%
PlaceNewWindowAtTheRight XT "xterm -name XT +sb"
This works (it prompts for a window and places a new xterm at the right
of it, with gap of 2 pixels). However the next line does not work in the
current cvs although it should work too:
Next (FvwmConsole) PlaceNewWindowAtTheRight XT "xterm -name XT +sb"
Seems like "Pick" is broken, it does not reuse the already existing
context window correctly and thus variables like $[w.x] are not expanded.
Dominik, would you like to fix "Pick"? So the following minimal example
works (it does not currently):
AddToFunc testing I Pick Echo $[w.x]
Next (FvwmConsole) testing
Regards,
Mikhael.