Re: Hi!

2010-02-16 Thread MK
On Mon, 15 Feb 2010 20:12:08 -0600
Jonathan Kotta jpko...@gmail.com wrote:
 On Mon, Feb 15, 2010 at 7:56 PM, MK halfcountp...@intergate.com
 wrote:
  But I don't see a way to call a function on a window by name?  Am I
  wrong?
 
 Have look at List of Conditional Commands in the manpage.  Look at
 All, Next, and Prev in particular.  You can also use WindowId if you
 know the window's ID.

Thanks, that will probably work, at least for the first part.

However, I now notice that FvwmPager has a zero length title in the
window list.  Does anyone know of a way to give it a name, or do I have
to patch the FvwmPager source?

Tangential question: am I missing something or is WindowId bordeline
useless?  Isn't this like saying You can use the exact address of the
variable if you know it?  Sure, but it is unlikely to remain the same
between invocations and AFAICT must be hardcoded in .fvwm2rc...

--MK



Re: Hi!

2010-02-16 Thread Thomas Adam
On Tue, Feb 16, 2010 at 10:25:44AM -0500, MK wrote:
 On Mon, 15 Feb 2010 20:12:08 -0600
 Jonathan Kotta jpko...@gmail.com wrote:
  On Mon, Feb 15, 2010 at 7:56 PM, MK halfcountp...@intergate.com
  wrote:
   But I don't see a way to call a function on a window by name? ?Am I
   wrong?
  
  Have look at List of Conditional Commands in the manpage.  Look at
  All, Next, and Prev in particular.  You can also use WindowId if you
  know the window's ID.
 
 Thanks, that will probably work, at least for the first part.
 
 However, I now notice that FvwmPager has a zero length title in the
 window list.  Does anyone know of a way to give it a name, or do I have
 to patch the FvwmPager source?

Eh?  Are you sure you haven't set the style WindowListSkip on it or
something?  By default, the name of the FvwmPager is the name of the current
desk you're on, as referenced through either the deprecated option
*FvwmPager: Label, or more preferrably:  DesktopName.

But patch the source?  No.

 Tangential question: am I missing something or is WindowId bordeline
 useless?  Isn't this like saying You can use the exact address of the
 variable if you know it?  Sure, but it is unlikely to remain the same
 between invocations and AFAICT must be hardcoded in .fvwm2rc...

Oh, it has a lot of uses in passing around specific window IDs to functions
to refer to specific windows -- and is used a lot internally by FVWM as
well.

-- Thomas Adam

-- 
It was the cruelest game I've ever played and it's played inside my head.
-- Hush The Warmth, Gorky's Zygotic Mynci.



Re: Hi!

2010-02-16 Thread MK
On Tue, 16 Feb 2010 16:44:58 +
Thomas Adam tho...@xteddy.org wrote:
  However, I now notice that FvwmPager has a zero length title in the
  window list.  Does anyone know of a way to give it a name, or do I
  have to patch the FvwmPager source?
 
 Eh?  Are you sure you haven't set the style WindowListSkip on it or
 something?  By default, the name of the FvwmPager is the name of the
 current desk you're on, as referenced through either the deprecated
 option *FvwmPager: Label, or more preferrably:  DesktopName.

Ah, I had set Label invalid when trying to lose it; took that out
and added a DesktopName, thanks.
 
  Tangential question: am I missing something or is WindowId bordeline
  useless?  
 Oh, it has a lot of uses in passing around specific window IDs to
 functions to refer to specific windows -- and is used a lot
 internally by FVWM as well.

I could see it being useful internally; but as for specific windows in
the config how can you know in advance what windowID to use?

-- 
MK halfcountp...@intergate.com



Re: Hi!

2010-02-16 Thread Thomas Adam
On Tue, Feb 16, 2010 at 12:24:53PM -0500, MK wrote:
 I could see it being useful internally; but as for specific windows in
 the config how can you know in advance what windowID to use?

Oh right -- in that case it's probably not useful, not when most things tend
to run in window context anyway.  It used to be useful for use with
FvwmEvent, when the windowid was passed into a calling function for the
event, so you could do something like:

*FvwmEvent: passid
*FvwmEvent: configure_window FooFunc

DestroyFunc FooFunc
AddToFunc   FooFunc
+ I WindowId $0 (Optional_name) DoSomething

... but these days, because the calling function operates within the context
of a known window, such checks degrade to:

+ I ThisWindow (Optional_name) DoSomething

So, standalone it's usecase is somewhat limited.

Why do you even ask, out of interest?

-- Thomas Adam

-- 
It was the cruelest game I've ever played and it's played inside my head.
-- Hush The Warmth, Gorky's Zygotic Mynci.



Re: Hi!

2010-02-15 Thread Jonathan Kotta
On Mon, Feb 15, 2010 at 7:56 PM, MK halfcountp...@intergate.com wrote:
 But I don't see a way to call a function on a window by name?  Am I
 wrong?


Have look at List of Conditional Commands in the manpage.  Look at
All, Next, and Prev in particular.  You can also use WindowId if you
know the window's ID.

-- 
Thanks,

Jonathan Kotta

Hofstadter's Law:
It always takes longer than you expect, even
when you take into account Hofstadter's Law.



Re: Hi!

2010-02-15 Thread Thomas Adam
On Mon, Feb 15, 2010 at 08:56:03PM -0500, MK wrote:
 The style settings already depend upon regexing or globbing with the
 window names (hey -- which is it?) .  Those are hardcoded in the

Look at the implementation of matchWildcards() in libs/wild.c

-- Thomas Adam

-- 
It was the cruelest game I've ever played and it's played inside my head.
-- Hush The Warmth, Gorky's Zygotic Mynci.