On 20 Aug 2002 01:20:30 +0200, Imre Vida wrote:
>
> however, i was somewhat puzzled by the way "Maximization" works:
> wanted to define some hotkeys to maximize/grow windows
> horizontally/verticaly or even left/right/up/down
> and by combining these actions to get the best size and location
> (very often i end up with hundreds of windows open and then try to
> get the "best" out of them ;-)
>
> these combinations however do not work: the window switches
> back to it's 'normal' size after the second hotkey and only
> after repeating it, does it do the sec type of maximization
> (and of course only that one this time)
> so obviously, any of these actions is considered as a Maximization
> and any following action of the same type will be taken as a request
> to Unmaximize the window (toggle).
>
> of course, one could use "True" to force the maximizations
> but then the unmaximization "toggle" will not work with the
> same hotkey
>
>
> if there is already the possibility to do vert. and hor.
> maximizations separately, wouldn't it be nicer/more logical
> to also handle them separately (ie. assign two booleans instead of
> one single)?
There is only one maximized geometry and one maximized state for every
window, you may switch from one maximized state to another one without
switching to the unmaximized one, but it seems you already know this.
AddToFunc MaximizeVerticallyOrUnmaximize
+ I Maximize toggle 0 100
AddToFunc MaximizeHorizontallyOrUnmaximize
+ I Maximize toggle 100 0
Or:
AddToFunc UnconditionallyMaximizeVertically
+ I Maximize false # this line is optional, changes the result a bit
+ I Maximize true 0 100
AddToFunc UnconditionallyMaximizeHorizontally
+ I Maximize false # this line is optional, changes the result a bit
+ I Maximize true 100 0
Or if you need 2 (or more) maximized states while still only having one
maximized geometry, 2.5.x has a solution: user definable window states.
DestroyFunc MaximizeVerticallyIfNotAlreadyOrUnmaximize
AddToFunc MaximizeVerticallyIfNotAlreadyOrUnmaximize
+ I ThisWindow (State 30) Maximize false
+ I Cond (Match) State 30 false
+ I Cond (Match) State 31 false
+ I Cond (NoMatch) Maximize true 0 100
+ I Cond (NoMatch) State 30 true
DestroyFunc MaximizeHorizontallyIfNotAlreadyOrUnmaximize
AddToFunc MaximizeHorizontallyIfNotAlreadyOrUnmaximize
+ I ThisWindow (State 31) Maximize false
+ I Cond (Match) State 30 false
+ I Cond (Match) State 31 false
+ I Cond (NoMatch) Maximize true 100 0
+ I Cond (NoMatch) State 31 true
DestroyFunc OriginalMaximize
AddToFunc OriginalMaximize
+ I State 30 false
+ I State 31 false
+ I Maximize $*
This is an example, but you should get an idea. Note that the condition
ThisWindow (Maximized, !State 30, !State 31) should mean that a window was
maximized using OriginalMaximize and not using the first 2 functions.
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Aug 19 2002 - 19:41:39 BST