Is there supposed to be a difference in values between $[w.height] and FvwmIdent's height?

When I open an xterm with ‘Exec exec xterm’ and I check the FvwmIdent info, it lists the window size of 322 (I’m assuming pixels). But when I run ‘+ I PipeRead “echo $[w.height]” > opp’ it says the height is 356.

How do I get the proper value to work with?

Maybe w.height is the total height of the window including the borders and titlebar, and FvwmIdent height is the value without these decorations.

That is correct, fvwm keeps track of both the window’s geometry and the frame’s geometry (the window + borders/titlebar). In this case FvwmIdent is reporting the window’s geometry while $[w.width] and $[w.height] are reporting the frame’s geometry, which is why it is bigger. If you want the same output as FvwmIdent use $[cw.width] and $[cw.height] for the client window (or the geometry without the frame).

Ok, I am having a real time here. The following:

  • I Current ResizeMove keep $[w.height]+$[w.y]p keep 0

But when the window is already at the top of the screen, the bottom grows by 14, when it shouldn’t grow at all. I’m not sure what is going on.

I’m trying to use the handles/borders to expand a window to the edge of the screen, only in the direction that is clicked. If anybody can help shed some light on what I am clearly missing, it would be appreciated.

What is it you are trying to do? Describe your end goal.

Really it sounds like you need to use Maximize with the grow options. Here is what I use to grow my window in a specified direction using key bindings. This also makes it so I can keep growing beyond hitting the first window.

DestroyFunc Grow
AddToFunc Grow
+ I Maximize keepgrowing True $0 $1

Key Up      WTSF    CSM Grow 0 growup
Key Down    WTSF    CSM Grow 0 growdown
Key Right   WTSF    CSM Grow growright 0
Key Left    WTSF    CSM Grow growleft 0

The end goal is to use the border and handles to expand a window in the desired direction until the edge of the screen (ignoring other windows).

So “Mouse 1 ‘-’ S FuncExpandTop” would expand the top of a window to the top of the screen, keeping all other aspects in tacked (width, x coordinate).

“Mouse 1 ‘>’ S FuncExpandBottomRight” would expand the bottom right corner of a window to the bottom right corner of the screen.

Ty for the help.

Okay, then Maximize with grow options is what you want. Note the True puts the window in a maximized state so maximize can restore its original size if you want. If you don’t want this, read the manual page for other details.

Anyways, since you want this to grow to the edge of the screen and ignore other windows, just grow on a Layer that no other windows are on, by default no windows will be on Layer 7 or higher. So something like this should work for the Grow function mentioned above.

DestroyFunc Grow
AddToFunc Grow
+ I Maximize growonlayers 7 7 True $0 $1

Then send this combinations like Grow 0 growup or in your example Grow growright growdown.

This looks to be what I need, but I still have a couple of questions.

First, the ‘growonlayers’ command, does this just grow the window on this layer, or does it also place this window on this layer?

I Current ResizeMove keep $[w.height]+$[w.y]p keep 0

Do you know why the above does not work correctly. I’m just trying to figure this out for other calculations I may make in the future.

And ty for the help.

You should read the manual page for details, it is quite useful. The growonlayers only states what layers to consider other windows when growing, it doesn’t change the layer the window is on. I just used this as a way to ignore all other windows and always grow to the edge of the screen.

There are a few issues I see, first it appears that Resize doesn’t accept + as an argument (read up on what arguments Resize actually takes), so you’ll nave to do the addition before sending it to the ResizeMove command. Using the new $[math] expansion (only in fvwm3 version 1.1.1 and newer) allows the following (for older versions of fvwm, you’ll have to do the math in a shell combined with PipeRead):

ResizeMove keep $[math.+.$[w.height],$[w.y]]p keep 0

Excellent to know about the $[math], I’ll have to wait for that.

I do remember now that I ignored the ‘grow’ commands section, because I assumed it would be the same results of the Resize ‘direction’ options that make it manually adjustable.

Really appreciate your help on this.