SYNOPSIS
FvwmSmartMaximize can only be invoked by fvwm. Command line invocation of the FvwmSmartMaximize module will not work.
DESCRIPTION
This module moves and resizes a current window to the largest free area of the desktop/page. If no place found nothing happens.
INVOCATION
FvwmSmartMaximize can be invoked by inserting the line Module FvwmSmartMaximize in the StartFunction declarations in the .fvwm2rc file.
To call FvwmSmartMaximize it has to be bound to a menu, mouse button, or keystroke.
OPTIONS
Two main options exist needed for calling FvwmSmartMaximize from a menu, mouse button, or keystroke.
- All [screen]
-
All windows on the current page are included in the calculation of the largest free area. If maximized windows are available they will block the smart maximization and nothing will happen.
- IgnoreMaxWindows [screen]
-
All windows on the current page except maximized windows are included in the calculation of the largest free area. This is the preffered option.
For multi display screens there’s an addition to the main options:
- [screen]
-
With this addition FvwmSmartMaximize will only use the current screen for placing. Else the complete display is used.
EXAMPLES
To use FvwmSmartMaximize three parts have to be implemented:
-
You can copy FvwmSmartMaximize in the lib directory of Fvwm. To get the path type in a terminal
$ echo $FVWM_MODULEDIR
Or you can implement your own in your .fvwm2rc file with:
ModulePath $[FVWM_USERDIR]/lib:+
Now copy FvwmSmartMaximize into your own module path.
-
The module initialization in the StartFunction declaration in your .fvwm2rc file:
DestroyFunc StartFunction AddToFunc StartFunction + I Module FvwmSmartMaximize
-
A menu, mouse button, or keystroke binding:
Mouse 1 4 M SendToModule FvwmSmartMaximize IgnoreMaxWindows screen
This binds the call to mouse button 1 (left button) + Alt-Key and to the window button 4. So if you hold Alt and click on the window button 4 FvwmSmartMaximize is smart maximizing the active window to the largest free area on the current screen, ignoring maximized windows.
Key Super_L WTSF N SendToModule FvwmSmartMaximize All
This binds the call to the left Windows key and smart maximizing the active window to the largest free area on the whole desktop if no maximized window blocks it.
DestroyMenu MenuWindowMaximize AddToMenu MenuWindowMaximize + "Maximize Window" Title + "%menu/window-maximize.xpm%Maximize &Smart" SendToModule FvwmSmartMaximize IgnoreMaxWindows screen
This creates a menu Maximize Window with an entry Maximize Smart.
BUGS
Bug reports can be sent to <andreas@hoenen-terstappen.de> or the fvwmnightshade-workers mailing list at https://groups.google.com/forum/?hl=en#!forum/fvwmnightshade-workers or submit them under https://github.com/Fvwm-Nightshade/Fvwm-Nightshade/issues.
CAVEATS
If the width/height of the largest free area is smaller than the smallest possible width/height of a program it is only positioning there without resizing.
COPYRIGHTS
This program stands under the GPL V2. © 2014 - 2016.
AUTHORS
Andreas Hoenen <andreas@hoenen-terstappen.de> and Thomas Funk <t.funk@web.de>.