what's wrong with this script?? ----- can't invoke win list

I copied this script to generate a custom window list menu,
this works fine if my cursor currently falls on a window
but if I currently do not have focus on any window (or you could say, the focus is on root), the window list is not generated, why is this??

thanks

Binds the NewAltTabFunction to the key Win+Tab

Key Tab A M Menu NewAltTabMenu Root 25 25
DestroyMenu NewAltTabMenu

  • I AddToMenu “all windows”
    AddToMenu NewAltTabMenu DynamicPopupAction NewAltTabFunction

This creates an alt-tab like menu, but it lists the non-iconified windows and then iconified windows -

the iconified windows have their thumbnails displayed, non-iconified display mini-icons

DestroyFunc NewAltTabFunction
AddToFunc NewAltTabFunction

  • I DestroyMenu NewAltTabMenu
  • I AddToMenu “all windows”
  • I AddToMenu NewAltTabMenu DynamicPopupAction NewAltTabFunction
  • I Current All ( !“Fvwm*”, !Iconic, AcceptsFocus ) EvalQuickWindowList NewAltTabMenu
  • I Current All ( !“Fvwm*”, Iconic, AcceptsFocus ) EvalQuickWindowListIcons NewAltTabMenu
    #+ I ChangeMenuStyle NewAltTabMenu Font “xft:Bitstream Vera Sans:style=regular:size=20”

Used to create a menu of non-iconified windows

DestroyFunc EvalQuickWindowList
AddToFunc EvalQuickWindowList
#+ I Current AddToMenu $0 %$[w.miniiconfile]%"$[w.class]: $[w.name]" WindowId $[w.id] Warp-Focus

  • I Current AddToMenu $0 “$[w.name] $[page.nx]:$[page.ny]%$[w.miniiconfile]%” WindowId $[w.id] Focus

I’d personally suggest you look at FvwmWindowMenu, rather than reinventing the wheel.

– Thomas Adam

Thanks a lot,
I will look at it.

the reason I wanted to write (copy) my own was that I wanted to control the order they appear in the list (do some statistics on how often a window is viewed, which desktop /page it is on, etc)

Uh huh. You can do that with FvwmWindowMenu – the manpage has lots of examples. :slight_smile:

– Thomas Adam