On Mon, Aug 18, 2014 at 12:39:51PM -0400, Dan Espen wrote:
> Dominik Vogt <dominik.v...@gmx.de> writes:
> > It works perfectly for me too.  But I wish it was easier to
> > introduce new features, and I'm still dreaming about some kind of
> > "database" approach to window configuration where you can just
> > dump configuration into, e.g. specific to window id, resource
> > pattern, class pattern, for all windows, for windows with certain
> > properties etc.  When a window needs information about it's style,
> > a lookup in the database spits out the most specific style
> > information for each style.  This would be so much more
> > configurable (and hence able to get funny applications under
> > control) than that mess of the style logic we have now.
> 
> Easy enough to do if you're willing to accept the overhead of
> reading multiple files at startup.

But with the existing implementation you cannot do dynamic things
like the following in the core without adding new code:

 * if window is in the top right corner, make the default shading
   direction northeast, i.e.

     Style ($[w.x] == -0 && $[w.y] == 0) DefaultShadeDirection NE

 * if the window uses ewmh hints, and uses static gravity, use the
   alternative resize algorithm,

 * if the window is sticky, use a different coulour set for the
   decorations.

     Style (Sticky) Colorset <n>, HilightColorset <n+1>

This could all come mostly for free with a priority based style
database.  At the moment, such features have to be hard coded
manually.

> My borders vary by window type.  I could have a file, HandleWidths
> containing:
> 
> Style *           HandleWidth 7
> Style "sun-awt-X11-XWindowPeer"  HandleWidth 0
> Style "*xbiff"          HandleWidth 6
> Style "XSysStats" HandleWidth 6
> 
> Writing an FvwmForm or FvwmScript to update the file is trivial.
> 
> And so on, for Lenience, Key bindings, Mouse bindings.

> Personally I don't need it and I'd prefer to keep my various
> customizations organized by Style.

The user interface for this isn't affected, only the internal
representation.  The user does not see the database.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt

Reply via email to