Efficient Thumbnailing Here!

Thank you very much for your reply,
Courage courage with me as newbie … We’ll make it maybe …
If I understood well, the code:

[code]#### generates a thumbnail of the current window as it’s miniicon (requires imlib2)
SetEnv fvwm_icon_width 83
DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I Raise
  • I SetEnv MiniIcon-$[w.id] $[w.MiniIconFile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
    “$[FVWM_USERDIR]/scripts/thumb $[w.id] $[fvwm_icon_width] $[FVWM_USERDIR]/miniicon.tmp.$[w.id].png \
    && echo WindowStyle EWMHMiniIconOverride, MiniIcon $[FVWM_USERDIR]/miniicon.tmp.$[w.id].png \
    || echo Nop”
  • I Iconify

deletes the thumbnail (by using FvwmEvent)

DestroyFunc DeThumbnail
AddToFunc DeThumbnail

  • I PipeRead “echo WindowStyle EWMHMiniIconOverride, MiniIcon Nop”
  • I Exec rm -f $[FVWM_USERDIR]/miniicon.tmp.$[w.id].png
  • I UnsetEnv MiniIcon-$[w.id]

DestroyModuleConfig FvwmEvent: *
*FvwmEvent: deiconify DeThumbnail
[/code]

has to be added to my .fvwm/.fvwm2rc

and for script:
I didnt try yet …

I foudn that about thumbnail only in the .fvwm2rc:

[code]Salut les barbu de fvwm,

J’ai c’est Thumbnail, comment définir l’endroit ou il vont se placer, car la ils se placent tous le temps a gauche vericalement et je les voudraient a droite horizontal. Puis pour diminuer leurs tailles?

DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I Raise
  • I ThisWindow (!Iconic) SetEnv Icon-$[w.id] $[w.iconfile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
    “xwd -silent -id $[w.id] | convert -scale 128 -frame 1x1 \
    -mattecolor black -quality 0 xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    && echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    || echo Nop”
  • I TestRc (Match) Test (f $[w.miniiconfile], f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) PipeRead \
    “composite -geometry +2+4 $[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    $[FVWM_USERDIR]/icon.tmp.$[w.id].png; echo Nop”
  • I IconifyDestroyFunc Thumbnail
    AddToFunc Thumbnail
  • I Raise
  • I ThisWindow (!Iconic) SetEnv Icon-$[w.id] $[w.iconfile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
    “xwd -silent -id $[w.id] | convert -scale 128 -frame 1x1 \
    -mattecolor black -quality 0 xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    && echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    || echo Nop”
  • I TestRc (Match) Test (f $[w.miniiconfile], f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) PipeRead \
    “composite -geometry +2+4 $[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
    $[FVWM_USERDIR]/icon.tmp.$[w.id].png; echo Nop”
  • I Iconify

DestroyFunc DeThumbnail
AddToFunc DeThumbnail

  • I PipeRead “echo Test \(i \$\[Icon-$[w.id]\]\) WindowStyle Icon \$\[Icon-$[w.id]\]”
  • I TestRc (NoMatch) WindowStyle NoIconOverride, Icon
  • I Exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png
  • I UnsetEnv Icon-$[w.id]
  • I Iconify off

DestroyFunc DeThumbnail
AddToFunc DeThumbnail

  • I PipeRead “echo Test \(i \$\[Icon-$[w.id]\]\) WindowStyle Icon \$\[Icon-$[w.id]\]”
  • I TestRc (NoMatch) WindowStyle NoIconOverride, Icon
  • I Exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png
  • I UnsetEnv Icon-$[w.id]
  • I Iconify off

Par ailleur j’ai cela pour l’attribution de la souris:
Mouse 1 R A Menu RootMenu Nop
Mouse 2 R A WindowList NoCurrentDeskTitle NoGeometry SortByClass NoHotkeys
Mouse 3 R A Menu Other
Mouse 4 R A GotoPage -1p 0p
Mouse 5 R A GotoPage +1p 0p

Mouse 2 T A Close
Mouse 3 T A Menu MenuFvwmWindowOps Nop
Mouse 4 T A WindowShade True
Mouse 5 T A WindowShade False

Mouse 1 I A DeThumbnail
Mouse 2 I A Move

Par ailleur
Comment je peut conjuger deux bouton clique gauche + roulette vers le haut ? par exemple.
J’ai appliquer ce style a firefox:
Style Firefox NoTitle, BorderWidth 0, StartsOnPage 0 1

Quand il s’ouvre il démarrage bien sur la première page, mais comment ne pas donner le focus? Car il le déplace en même temps.

En vous remerciant

ma config
[/code]
(forum.hardware.fr/hardwarefr/OSA … 296-17.htm)

Thank you very much, and Greetings’

Fvwm-Newbie Patrick !

It is working finally !
The reason in Ubuntu is that :
imagemagick had to be installed !
apt-get -f install imagemagick

It’s working great !!

Kind regards,

Patrick

I didn’t really understand your previous post but if you’re using imagemagick, then you’re not using the “efficient thumbnailing”.

imlib2 = efficient thumbnailing
imagemagick = inefficient thumbnailing

haaa ! Very interesting !
So, I have the unefficient one then

Nothg was working when imagemagick wasnt installed.
Could you maybe indicate a typical .fvwm2rc working with efficient thumbnailing. I’ll try if it works after apt-get remove imagemagick
(I didnt touch my script files… noob)

It’s true indeed that thumbnailing is getting slow sometimes …

(But I was soo happy it worked after so much time searching)

Thank you very much,

Patrick

(I meant donation of an efficient thumbnailing .fvwm2rc full file content…
then I do copy -paste and make trials to try to make it )

Thx,

Noob Pat’

Hi all.
First, thx a lot for that code ! How efficient it is !

Then, I was wondering how you can change the quality of the thumbnails generated… Sasha is speaking about “quality 4” but I don’t see where it is defined or used in the code (that I don’t understand a lot, I must say…).
Thus, is it possible to define a ‘quality’ variable in the program, or add it in the parameters list ?

Thx in advance for any answers

EDIT : That’s OK, I found it !!! (Stupid I am !!!)