Re: FVWM: List of windows in a menu

2011-04-23 Thread Gábor Vida
Hi,

Maybe I don't understand you clearly, but I do it this way (you can of
course make it less "structured"):

DestroyFunc MyMakeMyWindowListFunc
AddToFunc MyMakeMyWindowListFunc
 + I AddToMenu $[0] "Window list" title top
 # windows of current desktop
 + I All UseStack (CurrentDesk,!Focused,!Sticky,!Iconic) AddToMenu $[0] 
[w.name]\   [w.class]\  $[desk.n] WindowId [w.id] MyFocusFunc
 # the current window
 + I All (Focused) AddToMenu $[0] [w.name]\ [w.class]\  current\ 
$[desk.n] WindowId [w.id] MyFocusFunc
 + I AddToMenu $[0] "" Nop
 # windows on other desktops
 + I All UseStack (!CurrentDesk,!Sticky,!Iconic,!Focused) AddToMenu $[0] 
[w.name]\  [w.class]\  [w.desk] WindowId [w.id] MyFocusFunc
 + I AddToMenu $[0] "" Nop
 # iconified windows
 + I All UseStack (Iconic,!Sticky,!Focused) AddToMenu $[0] [w.name]\
[w.class]\  iconic WindowId [w.id] MyFocusFunc
 # sticky windows
 + I All UseStack (Sticky,!Focused,!CirculateHit) AddToMenu $[0] [w.name]\  
[w.class]\  sticky WindowId [w.id] MyFocusFunc

AddToMenu MyWindowList "Window list" title
 + DynamicPopupAction MyMakeMyWindowListFunc MyWindowList
 + DynamicPopDownAction DestroyMenu recreate MyWindowList

And then you can use it in a menu definition

AddToMenu RootMenu
 + "Window List" Popup MyWindowList

-- 
Best regards,
Gábor




Re: FVWM: List of windows in a menu

2011-04-23 Thread Thomas Adam
On Sun, Apr 24, 2011 at 01:03:01AM +0200, Gábor Vida wrote:
> Hi,
> 
> Maybe I don't understand you clearly, but I do it this way (you can of
> course make it less "structured"):

Yes, and you'd be reinventing what FvwmWindowMenu provides.  Here, here's a
square; keep filing the edges until its corners are round.

-- 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: List of windows in a menu

2011-04-23 Thread Gábor Vida
On Sun, Apr 24 2011, Thomas Adam wrote:

> Yes, and you'd be reinventing what FvwmWindowMenu provides.

Yes, without Perl and an additional process. (By the way, can you create
"sections" with FvwmWindowMenu based on window's properties like sticky?)

> Here, here's a square; keep filing the edges until its corners are
> round.

If you mean complexity, it's just linear. If it is a phrase, then I
don't understand.

-- 
Best regards,
Gábor