How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-23 Thread Bhupendra Kumar Jain
Hi,

I am looking for a solution wherein I need to set the X & Y position of a
newly created window using FvwmCommand in 2.6.5 version of fvwm. Please
suggest.

Thanks,
Bhupendra.


Re: How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-23 Thread Bhupendra Kumar Jain
Hi Dan,

Thanks for sharing the information. Currently we are using FvwmCommand to
whatever is needed for Window Management that was the reason I was looking
for any argument which could be supplied to set the X & Y location of the
window which is going the get launched. I do see that we had used the
PositionPlacement argument earlier but somehow it is not working at this
moment(May be because I am not specifying the window name). It would be
great if you could share some of the sample commands which can be used for
the MOVE option you just suggested or for PositionPlacement if you feel
that works.

Thanks,
Bhupendra.

On Tue, Oct 24, 2017 at 5:20 AM, Dan Espen  wrote:

> Bhupendra Kumar Jain  writes:
>
> > Hi,
> >
> > I am looking for a solution wherein I need to set the X & Y position of
> a newly created window using FvwmCommand in 2.6.5 version of
> > fvwm. Please suggest.
>
> Most apps accept an "-geometry" argument to control this.
> Why are you asking about FvwmCommand?
>
> If for some reason you can't use an argument, you could use a script
> that starts the application, then uses FvwmCommand to WAIT for the
> window to appear, then MOVE the window to the location you want.
>
>
> --
> Dan Espen
>


Re: FVWM: How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-23 Thread Dan Espen
Bhupendra Kumar Jain  writes:

> Hi,
>
> I am looking for a solution wherein I need to set the X & Y position of a 
> newly created window using FvwmCommand in 2.6.5 version of
> fvwm. Please suggest.

Most apps accept an "-geometry" argument to control this.
Why are you asking about FvwmCommand?

If for some reason you can't use an argument, you could use a script
that starts the application, then uses FvwmCommand to WAIT for the
window to appear, then MOVE the window to the location you want.


-- 
Dan Espen



Re: FVWM: How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-23 Thread Jaimos Skriletz
On Mon, Oct 23, 2017 at 5:50 PM, Dan Espen  wrote:
> Bhupendra Kumar Jain  writes:
>
>> Hi,
>>
>> I am looking for a solution wherein I need to set the X & Y position of a 
>> newly created window using FvwmCommand in 2.6.5 version of
>> fvwm. Please suggest.
>
> Most apps accept an "-geometry" argument to control this.
> Why are you asking about FvwmCommand?
>
> If for some reason you can't use an argument, you could use a script
> that starts the application, then uses FvwmCommand to WAIT for the
> window to appear, then MOVE the window to the location you want.
>

The PositionPlacement Style may also work. With either using Wait,
InitialMapCommand or PositionPlacement, it will require you can
identify the window based on its name/class/resource. You may want to
describe in more detail what it is you are trying to achieve.

jaimos



FVWM: Re: How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-24 Thread Thomas Adam
On Tue, Oct 24, 2017 at 08:12:43AM +0530, Bhupendra Kumar Jain wrote:
> Hi Dan,
> 
> Thanks for sharing the information. Currently we are using FvwmCommand to
> whatever is needed for Window Management that was the reason I was looking
> for any argument which could be supplied to set the X & Y location of the
> window which is going the get launched. I do see that we had used the
> PositionPlacement argument earlier but somehow it is not working at this
> moment(May be because I am not specifying the window name). It would be
> great if you could share some of the sample commands which can be used for
> the MOVE option you just suggested or for PositionPlacement if you feel
> that works.

[ Dropping fvwm-workers@ as this should never have gone there. ]

You want something like this:

Style * InitialMapCommand CheckMe

DestroyFunc CheckMe
AddToFunc   CheckMe
+ I ThisWindow (SomeClass) Move x y z

-- Thomas Adam



FVWM: Re: How to set the X & Y position of a newly created window using FvwmCommand in 2.6.5

2017-10-24 Thread Thomas Adam
On Tue, Oct 24, 2017 at 06:58:55PM +0530, Bhupendra Kumar Jain wrote:
> Hi Adam,

It's Thomas, actually.  Adam is my surname.

Oh, and don't drop the 'fvwm@fvwm.org' from replies.  I don't do private FVWM
consultancy.

> I didn't understand the solution you just mentioned. Can you please
> elaborate each step please as I have not used fvwm much and am failing to
> understand the use?

  Style * InitialMapCommand CheckMe

This defines a style line for all windows (indicated by '*') which will then
instruct FVWM to run a function (indicated by 'CheckMe') whenever a new window
is mapped (indicated by the 'InitialMapCommand' style option).  Mapped is just
a techical Xlib term for "initially visible on the screen".

The CheckMe function then, has to check the condition of all windows created.
Since this is a FVWM function, we have to define it like so:

  DestroyFunc CheckMe
  AddToFunc   CheckMe

The next line:

  + I ThisWindow (SomeClass) Move x y z

Is telling the function that as soon as it is called from a command (that's
what the 'I' means -- it stands for "Immediate"), the window is checked for a
condition.  "ThisWindow" is the window we've just mapped -- it's a way of
telling FVWM which window.  The condition of this test "SomeClass" is just
that -- a way of identifying which window we want to have the Move command
applied to.

Another way of doing this would be:

  Style SomeProgramOfMine InitialMapCommand Move x y z

HTH,
Thomas Adam