On 06 Nov 2004 14:32:53 +0100, Frank Gruellich wrote:
>
> * Mikhael Goikhman <migo_at_homemail.com> 5. Nov 04:
>
> > but in order to get titles at the left/right too, try this config:
>
> Well, I am going to shade to any direction, the title is just a mean to
> enlarge windows (viagra vor X) to catch shaded ones and unshade them, in
> fact I don't need it. Important is, that I am able to shade windows in
> all direction: North, South, East, West.
>
> > Key h TFISW CS Current ToggleShade Left
> > Key j TFISW CS Current ToggleShade Bottom
> > Key k TFISW CS Current ToggleShade Top
> > Key l TFISW CS Current ToggleShade Right
> >
> > DestroyFunc ToggleShade
> > AddToFunc ToggleShade
> > + I ThisWindow (Shaded) WindowStyle !Title
> > + I ThisWindow (Shaded) UpdateStyles
> > + I ThisWindow (Shaded) WindowShade false
> > + I TestRc (1) Break
> > + I WindowStyle TitleAt$0
> > + I UpdateStyles
> > + I WindowShade
> > + I WindowStyle Title
>
> Uh, I can concatenate commands from parameters? Nice! But WindowShade
> without direction will only shade to a default direction (North,
> AFAICS), won't it?
Yes and no. The default direction is the title direction and you change
it in TitleAt<Something> command, so WindowShade does not need any param.
> I could do something like
>
> Key h TFISW CS Current ToggleShade Left East
> # etc.
>
> DestroyFunc ToggleShade
> AddToFunc ToggleShade
> + I ThisWindow (Shaded) WindowStyle !Title
> + I ThisWindow (Shaded) UpdateStyles
> + I ThisWindow (Shaded) WindowShade false
> + I TestRc (1) Break
> + I WindowStyle TitleAt$0
> + I UpdateStyles
> + I WindowShade $1
> + I WindowStyle Title
>
> which seems a bit inelegant to me, but should work.
To make it elegant, remove the second param from ToggleShade function and
do "WindowShade $0". "Left" is an alias for "East", so it will work too.
Or like in my sample, just do "WindowShade". You may remove "false" too.
> BTW: what's the difference of Current and ThisWindow?
Well, I copied your config, but you may freely remove the Current word.
Key already makes the focused window to be the context window. And for
example PointerKey or Mouse make the window under the pointer to be the
context window. ThisWindow works on the context window.
If you need to check some window condition in a function, ThisWindow is
usually a more correct and safe way. Unless you really need to work on
the focused window regardless of the context window, then do "Current".
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 Sat Nov 06 2004 - 12:06:08 GMT