How to define a StartThumbnail function??

Hello

I use the thumbnailing code of Taviso, now I would like to define a StartThumbnail function in analogy to the StartIconic function!

I absolutely don’t have any idea of this!

If an advanced user has an idea, I will be aware of that!

Best regards, Brice

You could use FvwmEvent to do this on iconify making sure you use ‘PassId’ for the windowId, something like:

DestroyModuleConfig FE-thumbs: *
*FE-thumbs: PassID
*FE-thumbs: Cmd Function
*FE-thumbs: iconify NAME_OF_THUMBNAIL_FUNC

AddToFunc StartFunction I Module FvwmEvent FE-thumbs[/code]

The above has some drawbacks, though.

1.  Is that this assumes the window is iconified beforehand, so that FVWM knows about.

2.  Since I don't know what Taviso's thumbnail function looks like, you might have to adapt it in this situation.

Consider point 1 some more....  If an application is already in iconic mode, what can we do?  Xterm and Emacs have the concept of an "ActiveIcon".  I suppose you could do something like this:

[code]All (CurrentPage, Iconic)  ThisWindow ("name") some_function "name"

DestroyFunc some_function
AddToFunc some_function
+ I WindowId $0 iconify
+ I ThumbnailFunction
+ I Iconify

This (in theory) will cycle through all iconified windows on a particular page, deiconify them, snap them, and iconify them again. Ugh! Not nice, is it? You might want to search these forums. There’s a thread about thumbnails elsewhere. I find them irritating, but then to each their own. :slight_smile: Welcome to FVWM.

I haven’t tested any of the code above – it’s just my ramblings for general proof of concept. :slight_smile:

– Thomas Adam

Hi Thomas!

Thanks for your help but I think you missed the point! I am gulty: I haven’t been explicit enough!

I meant, I want to start, i.e. xmms, always in a thumbnailed style, so I want to something like:

Style xmms StartThumbnail

so that whenn xmms starts, it’s automatically thumbnail by my Thumbnail function!

So the point is how to applied a previously defind function to an application when it starts?

I strive to find a way for doing that but I am at the moment unsuccessful!

Best regards, Brice

Ah, I see. You can’t quite do it as you have it above.

This again comes down to using FvwmEvent:

DestroyModuleConfig FE-thumb: *
*FE-thumb: Cmd  Function
*FE-thumb: add_window <function_name>

As for what “<function_name>” is – it could be a new instance of this 'StartThumbnail" function. If you wanted it for certain apps, then you could do:

 + I ThisWindow ("window1|window2|window3")

at the top of the function, with possibly a clause in there to iconify it afterwards. With the FvwmEvent defintion as it is above, that would be working for all new windows created, so you would need an explicit check of window names, as I have it with ThisWindow, above.

Does that help? Currently, there’s no other way of doing it that I can think of.

– Thomas Adam

Hi

I got it!!! In fact that was already present in the code of Taviso that I mostly use!

The point is to do the following:

DestroyFunc NewWindowFunc
AddToFunc NewWindowFunc

  • I ThisWindow (xmessage) Jiggle 2
  • I ThisWindow (xmms) Thumbnail

and then:

DestroyModuleConfig FvwmEvent: *
*FvwmEvent: deiconify DeThumbnail
*FvwmEvent: add_window NewWindowFunc

and of course to start the module FvwmEvent!!

In this exemple, xmms starts thumbnailed!!!

Thanks for your help Thomas!!!

Best regards!

Brice