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

Thomas Adam <[email protected]>
Newsgroups gmane.comp.window-managers.fvwm
Message-ID <20171024134011.3ruczw3wcelmrxqr@laptop>
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 '[email protected]' 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.