Set windows size at start

Hi, I’m searching a way to open all windows with same size. With openbox I used this:

> <application name="*">
> <size>
> <width>331</width> 			
> <height>280</height> 			
> </size>
> </application>

But I don’t find same on FVWM, something like:

Style * Geometry 800x600

but of course this doesn’t work!

Have I to use FvwmEvent module?

Of course I can open window and use a resize function at once, but I’m surprised such simple thing can’t be done easier and faster.

Hi @DaG,

You’ve a couple of options:

  1. You could use FvwmEvent if you wanted, something like:

    DestroyModuleConfig FE: *
    *FE: add_window "ThisWindow (SomeName) Resize Xp Yp
    
    Module FvwmEvent FE
    

    This would call Resize every time for windows matching SomeName.

  2. In lieu of 1., above, you can also use the PositionPlacement style which works exactly like the Move command, but happens only when the given window is matched initially. Hence:

    Style SomeName PositionPlacement Xp Yp
    
  3. You can also specify the minimum size a window should be:

    Style SomeName MinWindowSize Xp Yp
    

In the examples above Xp are in pixels – X is some number and the p is literal. So if you want to have the window SomeWindow be at least 800p by 600p, you’d use:

Style SomeName MinWindowSize 800p 600p

My suggestion to you is start with example 2. If you need anything more complex, let me know – but option 1., would then be the next best idea.

HTH,
Thomas

I’ve seen in other threads that FvwmEvent way makes windows flashing so I’ve gone throught by now.

I just want to force size, so PositionPlacement is not usefull.

I’ve tried with MinWindowSize and maxWindowSize, using both may help but it over rides the modules setup (Taskbar provided by FvwmButtons and Fvwmpager), even with:

Style Fvwm* FixedPSize

I don’t want to create a new rule for each programs (In case I install new ones) and I still haven’t found how to exclude Fvwm modules from the list.

@DaG,

You’re conflating a lot of things.

Using MaxWindowSize or MinWindowSize has nothing to do with FVWM Modules – what is it that you feel is broken?

Excluding windows from modules is usually a case of WindowListSkip style, and then possibly having to configure the module to UseSkipList – but this does depend on the module in question.

– Thomas

Hi Thomas, thank you for helping.

Althought, if I do:

Style * MaxWindowSize 50 50

Windows look fine, but my taskbar (managed with FvwmButtons) reduces to half horizontal screen.

With:

Style * MinWindowSize 50 50

my taskbar grows to half vertical screen.

Same issues with FvwmPager, so MaxWindowSize and MinWindowSize affect Modules.

UseSkipList is WindowList 's parameter and exclude modules from WindowList module, but

Style * UseSkipList

changes nothing.

Hi @DaG,

Yes. If you do: Style * ... – that’s matching all windows. You won’t want that. Instead, you should limit the matched window to the name or class of the window you want:

Style SomeWindow MaxWinSize 50 50

Would set the maximum window size to the window whose name, class or resource matched SomeWindow.

I wouldn’t expect Style * UseSkipList to fix anything, other than what you were mentioning before about having certain windows appear in modules such as FvwmPager.

HTH,
Thomas

With Debian (or GTK…) windows have same name, class, ressources… so I 've to create a rule for each applications installed, and the new ones too… No way!!!

MinWinSize and MaxWinSize don’t work because of the modules…

So I finally tried with the 1. anhd create this function:

> DestroyModuleConfig FvwmEvent*
>  *FvwmEvent: add_window SetGeometryForMyWindow
>    DestroyFunc SetGeometryForMyWindow
>    AddToFunc   SetGeometryForMyWindow
>  + I Focus
>  + I Current (!FvwmButtons) Resize frame 50|da 50|da

50% area allow to place 4 differents windows on screen without resizing anything,
"frame option to calculate window size with border, not just the client area,
“da” option to keep Taskbar on sight,
Focus and Current make sure that the function targets new window,
!FvwmButtons to exclude Taskbar from resizing (curiously FvwmPager is excuded as soon as FvwmButton is!!!)

That’s what I wanted!!! (pfiew)

Thank you Thomas!

(editing first post desn’t allow me to add [SOLVED] in titlle)