On Fri, Sep 17, 2010 at 01:39:23PM +0400, Sergey Vlasov wrote:
> On Thu, 16 Sep 2010 12:56:20 -0500 Claude Rubinson wrote:
> 
> > There are certain websites for which I like to customize how FVWM
> > treats the browser window (e.g., different styles for different
> > sites).  As long as the name of the website is part of the window
> > name, it's not a problem.
> > 
> > Occasionally, however, I'll run into a site where there's no stable
> > name.  For example, the online music streaming site MOG.com only
> > includes the name of the artist and song in the window name.  Many X
> > clients let you specify your own name, but neither Firefox nor Chrome
> > does.  Is there a way to uniquely identify such browser windows
> > (whether from within FVWM or not) when the site doesn't provide a
> > fixed reference?  For FvwmEvent, I can use the WindowId but as far as
> > I understand, that doesn't work for Style specifications.
> 
> First, you can really do what amounts to matching on WindowId - assign
> styles to particular windows with the WindowStyle command.  The

Let me clarify things, before there's even more confusion.

When we refer to this (in terms of FvwmEvent):

DestroyModuleConfig a:*
*a: PassId
*a: new_window SomeCommand

That would have told FvwmEvent to tack on to the end of the options, the
windowid of the window for which the event occured in.   So to test for that
window, you would have had to do the following:

DestroyFunc SomeCommand
AddToFunc   SomeCommand
+ I WindowId $0 (Some_Name_Or_Rather) HugXteddy

But note that this is no longer needed.  There is absolutely no reason to
use this in any common case, instead you can rewrite the above as:

DestroyModuleConfig a:*
*a: new_window SomeCommand

DestroyFunc SomeCommand
AddToFunc   SomeCommand
+ I ThisWindow (Some_Name_Or_Rather) HugXteddy

Or better yet, since it's just one action:

DestroyModuleConfig a:*
*a: new_window "ThisWindow (Some_Name_Or_Rather) HugXteddy"

None of this precludes you needing an explicit window id to run a style
command on a specific window, namely:

DestroyFunc SomeCommand
AddToFunc   SomeCommand
+ I ThisWindow (Some_Name_Or_Rather) WindowStyle foobar, !baz

Is that clearer?  If this is somehow not explicit enough in FvwmEvent's
manpage (no, I haven't looked) -- say, and someone can send me a patch to
make things clearer.

But please don't conflate WindowID as a requisite to doing any specific
window style matching.  That's simply not true.

> problem is finding some event and condition to trigger this command
> for the windows you want to be styled.

I'd say it's a lot clearer now.  See above.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

Reply via email to