Subject: FVWM: an idea to Maximization

From: Imre Vida <[email-masked]>
Date: Tue, 20 Aug 2002 01:20:30 +0200

Hi,

i'm new to fvwm and like it a lot 

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)?

best

imre

--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 20 Aug 2002 00:38:54 +0000

> to also handle them separately (ie. assign two booleans instead of 

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.

---

From: Cameron Simpson <[email-masked]>
Date: Tue, 20 Aug 2002 11:06:43 +1000

On 01:20 20 Aug 2002, Imre Vida <[email-masked]> 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  ;-)
[...]
| 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)?

Hmm. Do you really want a toggle.

I know I've tried Maximise in the past, but never really want it.
(For example, various things (resizish things) don't seem to work on
maximised windows, because they're maximised!)

I now _only_ use Resize (and ResizeMove(sp?)).

I have key bindings to basicly do:
	- resize 100 90	 (top 10% of screen has tools in it for me)
	- resize to any quadrant
	- resize to left or right half of screen
	- lower/raise stuff

For me at least, the notion of "maximise" as a state doesn't map to how
I work; I want "put a window over there, that size", and when I'm done
with it I close it or iconify it.

I'm curious: how many people really use "maximise" as a state toggle?

Cheers,
-- 
Cameron Simpson, DoD#743        [email-masked]    http://www.zip.com.au/~cs/

What's the best platform that Windows NT runs on?
A Kodak carosel slide projector.	- Dvorak
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 20 Aug 2002 01:22:29 +0000

> I'm curious: how many people really use "maximise" as a state toggle?

I use it all the time, mostly maximize a window fully, vertically,
horizontally, unmaximize. I myself don't use grow, because it is too
unpredictable.

Try ResizeMaximize or ResizeMoveMaximize (Mouse 1  SF  S  ResizeMaximize),
you may like it. Now not only it will do what you describe, but you will
be also able to restore the original geometry when you are done in
addition to just "close it or iconify it".

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 20 Aug 2002 10:16:33 +0200

> I'm curious: how many people really use "maximise" as a state toggle?

I even use ResizeMaximize instead of the normal Resize command.
My windows usually start at a standard size and position.  When a
different geometry is needed, I just draw-resize them as usual,
and when I'm done with them I simply "unmaximize" them.  This
concept effectively introduces a mini stack of window sizes
allowing to temporarily modify the geometry and restoring the
original one with a single key press.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Thomas Gardiner <[email-masked]>
Date: Tue, 20 Aug 2002 09:37:14 -0400 (EDT)

Hi Dominik,

I've thought of using the same thing in the past, but well I haven't found
the free time to figure out how to do it.  Would you care to embellish on
how you accomplish this?

Thanks,

Tom

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 20 Aug 2002 16:29:15 +0200

> the free time to figure out how to do it.  Would you care to embellish on

Sure, I have

  AddToFunc ResizeOrRaise
  + C Raise
  + M Raise
  + M ResizeMaximize
  + D Current (Shaded) Raise
  + D WindowShade $0

  Mouse 1 FS    N   Function ResizeOrRaise toggle
  Mouse 1 [     N   Function ResizeOrRaise W
  Mouse 1 ]     N   Function ResizeOrRaise E
  Mouse 1 -     N   Function ResizeOrRaise N
  Mouse 1 _     N   Function ResizeOrRaise S
  Mouse 1 <     N   Function ResizeOrRaise NW
  Mouse 1 >     N   Function ResizeOrRaise SE
  Mouse 1 ^     N   Function ResizeOrRaise NE
  Mouse 1 v     N   Function ResizeOrRaise SW

Bye

Dominik ^_^  ^_^