FVWM: Identifying a window

2010-09-16 Thread Claude Rubinson
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.

Thanks!

Claude



Re: FVWM: Identifying a window

2010-09-16 Thread despen
Claude Rubinson rubin...@u.arizona.edu writes:

 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.

FvwmIdent gives you the 3 possible values to match on,
name, class, resource.

Possibly some substring will work, like *Free MP3*.



Re: FVWM: Identifying a window

2010-09-16 Thread Claude Rubinson
On Thu, Sep 16, 2010 at 07:03:26PM +0100, Thomas Adam wrote:
  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
 
 Nope -- not unless there's an additional property of the window that's
 set (see xprop).

That's what I figured.  Thanks.

Claude



Re: FVWM: Identifying a window

2010-09-16 Thread Thomas Adam
On Thu, Sep 16, 2010 at 02:40:58PM -0500, Claude Rubinson wrote:
 On Thu, Sep 16, 2010 at 07:03:26PM +0100, Thomas Adam wrote:
   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
  
  Nope -- not unless there's an additional property of the window that's
  set (see xprop).
 
 That's what I figured.  Thanks.

This is why looking for the class of the window and the resource won't help
you as these are static anyway -- and for the class property, this is only
ever allowed to be changed when the window is in the Withdrawn state,
anyway.  With firefox, they're never any different from one another, so you
can't reliably use them to uniquely identify one firefox instance from
another.

This question has come up a lot in the past -- my preferred solution
(until/if (yeah, right) things change upstream so that Mozilla allow for
some identifier as part of the WM_NAME (for instance)) is to use
IndexedWindowName, and hope for the best.  It makes for some ugly style
matching, but there's ways round that if you really care.

-- 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.)



Re: FVWM: Identifying a window

2010-09-16 Thread Claude Rubinson
On Thu, Sep 16, 2010 at 08:49:23PM +0100, Thomas Adam wrote:
 my preferred solution is to use IndexedWindowName, and hope for the
 best.  It makes for some ugly style matching, but there's ways round
 that if you really care.

Yep, that's was going to be my next strategy.  Good to know that my
thinking's not completely off-base here.

Thanks,

Claude