Re: XResources and styles

2006-03-26 Thread Dominik Vogt
On Sat, Mar 25, 2006 at 10:36:18AM +0100, Viktor Griph wrote:
 On Sat, 25 Mar 2006, Dominik Vogt wrote:
 
 On Fri, Mar 24, 2006 at 06:32:18PM +0100, Viktor Griph wrote:
 Hi,
 
 does it exist any standard regulating the use of XResources? The reason I
 ask is that I recently found out that fvwm honors the resources Desk, Page
 and fvwmscreen for initial window positioning, and I find them quite neat
 to use together with apps supporting the -xrm option.
 
 I think that it  would be good with a way to specify a style with
 resources in a similar  way. The idea was that under AddWindow, before
 lookup_styles, add a resource lookup for some resource, say fvwmstyle,
 and if present map it to a WindowStyle command with rhe resource value as
 the style.
 
 All in all it comes down to two questions:
 Would adding such a resource break any standard?
 
 I don't think so.
 
 
 Good. Then I think it's ok as long as the resource starts with fvwm.
 
 and
 Is the feature described above something that should be added to fvwm?
 
 I think it's a good idea, but I wouldn't export the style syntax
 to the X resources.  Instead, it should just add the style name to
 use for the application, i.e. (wahtever the correct syntax is).
 
  -xrm fvwmstyle: foobar
 
 
 The correct syntax for that would be -xrm *fvwmstyle:foobar.
 
 would tell fvwm to use the style foobar for the application
 (instead of the application name).
 
 This way, the whole configuration is still in the config file and
 there is no need to allocate styles dynamically (which is slow and
 potentially buggy).
 
 
 Sounds good, still if all you want is SkipMapping in addition to some 
 default styles for the application, and want that for several different 
 applications, that can result in many styles.

That depends on how you do it:

  Style __skip_mapping_style SkipMapping

  $ xterm -xrm *fvwmstyle:__skip_mapping_style
  $ foobar -xrm *fvwmstyle:__skip_mapping_style

 However I belive that this 
 way will be better with fvwm 3, so I'll give a try to implement it.

 I alrady have a draft implementaton[1] of my earlier suggested behaviour 
 that I did while waiting for a reply. Implementing the suggested 
 functionality will require an addition to the window structure. That also 
 raise the question if a provided style name should be used for anything 
 but style lookups, and if these should be any other ways, but resources, 
 to set the provided style name. While this can be decided later, it's good 
 to think of it aleady. One possiblity would be a SetStyle command that 
 changes the style name used by a window.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: XResources and styles

2006-03-25 Thread Viktor Griph

On Sat, 25 Mar 2006, Dominik Vogt wrote:


On Fri, Mar 24, 2006 at 06:32:18PM +0100, Viktor Griph wrote:

Hi,

does it exist any standard regulating the use of XResources? The reason I
ask is that I recently found out that fvwm honors the resources Desk, Page
and fvwmscreen for initial window positioning, and I find them quite neat
to use together with apps supporting the -xrm option.

I think that it  would be good with a way to specify a style with
resources in a similar  way. The idea was that under AddWindow, before
lookup_styles, add a resource lookup for some resource, say fvwmstyle,
and if present map it to a WindowStyle command with rhe resource value as
the style.



All in all it comes down to two questions:
Would adding such a resource break any standard?


I don't think so.



Good. Then I think it's ok as long as the resource starts with fvwm.


and
Is the feature described above something that should be added to fvwm?


I think it's a good idea, but I wouldn't export the style syntax
to the X resources.  Instead, it should just add the style name to
use for the application, i.e. (wahtever the correct syntax is).

 -xrm fvwmstyle: foobar



The correct syntax for that would be -xrm *fvwmstyle:foobar.


would tell fvwm to use the style foobar for the application
(instead of the application name).

This way, the whole configuration is still in the config file and
there is no need to allocate styles dynamically (which is slow and
potentially buggy).



Sounds good, still if all you want is SkipMapping in addition to some 
default styles for the application, and want that for several different 
applications, that can result in many styles. However I belive that this 
way will be better with fvwm 3, so I'll give a try to implement it.


I alrady have a draft implementaton[1] of my earlier suggested behaviour 
that I did while waiting for a reply. Implementing the suggested 
functionality will require an addition to the window structure. That also 
raise the question if a provided style name should be used for anything 
but style lookups, and if these should be any other ways, but resources, 
to set the provided style name. While this can be decided later, it's good 
to think of it aleady. One possiblity would be a SetStyle command that 
changes the style name used by a window.



/Viktor

[1] http://www.dd.chalmers.se/~griph/style_resource.diff



XResources and styles

2006-03-24 Thread Viktor Griph

Hi,

does it exist any standard regulating the use of XResources? The reason I 
ask is that I recently found out that fvwm honors the resources Desk, Page 
and fvwmscreen for initial window positioning, and I find them quite neat 
to use together with apps supporting the -xrm option.


I think that it  would be good with a way to specify a style with 
resources in a similar  way. The idea was that under AddWindow, before 
lookup_styles, add a resource lookup for some resource, say fvwmstyle, 
and if present map it to a WindowStyle command with rhe resource value as 
the style.


All in all it comes down to two questions:
Would adding such a resource break any standard?
and
Is the feature described above something that should be added to fvwm?

/Viktor



Re: XResources and styles

2006-03-24 Thread Dominik Vogt
On Fri, Mar 24, 2006 at 06:32:18PM +0100, Viktor Griph wrote:
 Hi,
 
 does it exist any standard regulating the use of XResources? The reason I 
 ask is that I recently found out that fvwm honors the resources Desk, Page 
 and fvwmscreen for initial window positioning, and I find them quite neat 
 to use together with apps supporting the -xrm option.
 
 I think that it  would be good with a way to specify a style with 
 resources in a similar  way. The idea was that under AddWindow, before 
 lookup_styles, add a resource lookup for some resource, say fvwmstyle, 
 and if present map it to a WindowStyle command with rhe resource value as 
 the style.

 All in all it comes down to two questions:
 Would adding such a resource break any standard?

I don't think so.

 and
 Is the feature described above something that should be added to fvwm?

I think it's a good idea, but I wouldn't export the style syntax
to the X resources.  Instead, it should just add the style name to
use for the application, i.e. (wahtever the correct syntax is).

  -xrm fvwmstyle: foobar

would tell fvwm to use the style foobar for the application
(instead of the application name).

This way, the whole configuration is still in the config file and
there is no need to allocate styles dynamically (which is slow and
potentially buggy).

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]


signature.asc
Description: Digital signature