On Tue, Dec 18, 2001 at 03:20:15PM +0000, Tim Phipps wrote: > Is it time for a rethink of the style system? It seems that the style > command and a few builtin commands manipulate a windows appearance and > behaviour but they don't do a complete job. We could generalize them and > provide a means to do more selective control with some additional commands. > > Commands like Stick alter the windows sticky behaviour. Style <pattern> > Sticky does the same thing for a set of windows and also maintains a > list of patterns to apply to newly created windows. > > A lot of style types do not have matching builtin commands. > > How about a new command: WindowStyle? It would apply to the current > window or could be used as part of a selective command e.g. > WindowStyle Sticky > All (*Buttons*) WindowStyle Layer 5 > WindowId ??? WindowStyle Iconic > > The simple built-ins like Stick could be aliases e.g. > Stick On = WindowStyle Sticky > Stick Off = WindowStyle Slippery > > The Style command could be aliased also e.g. > Style <pattern> ResizeOpaque = All (<pattern>) WindowStyle ResizeOpaque > Style <pattern> <style-args> = All (<pattern>) WindowStyle <style-args> > > plus the pattern to apply to new windows could be written as a function > AddToFunc StyleFunction I WindowId $0 (<pattern>) WindowStyle ResizeOpaque > > The StyleFunction function would be called with the newly-created > window's id as the first parameter. > > Additional style commands would just add to StyleFunction in > a similar way to the way the style list build up. I think we may be able > to remove the style list altogether with this. The only problem being > the DestroyStyle command which would have to selectively remove parts of > StyleFunction! DestroyStyle * would be the same a > DestroyFunc StyleFunction. > > Doing this would require moving most of the style parsing code from the > Style command to the new WindowStyle command and rewriting the simple > commands like Stick. > > Benefits: > * possible to control every style on a per window basis > * extending the conditions for Next/All also extends the ability to set > styles e.g. > `All (class=*Fvwm*) WindowStyle Sticky' is better than `style *Fvwm* > Sticky' > * possible to obsolete commands like Stick in the future > * Larrys suggestion for conditions would work with this e.g. > `Style (Condition=Terminal) Colorset 2' is aliased to > `All (Condition=Terminal) WindowStyle Colorset 2'
I like that idea. The only thing I can't imagine is: how can we begin to implement such a monster of a feature? Yes, it would simplify a *lot* of code. But to me it looks like a much greater challenge than the infamous GSFR (Great Style Flag Rewrite) several years ago. Bye Dominik ^_^ ^_^ -- Dominik Vogt, email: [EMAIL PROTECTED] LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]