thumbnailing - removal of thumbnails and composite icons

Hello,

I’m a total fvwm newbie. I’ve used fluxbox for ages but yesterday I got hooked on fvwm. I have a couple of questions I hope someone can help me with.

I’ve been fiddling with “Thumbnailing” and my Thumbnail/DeThumbnail functions looks like this:

DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I SetEnv Icon-$[w.id] $[w.iconfile]
+ I ThisWindow (!Shaded Iconifiable !Iconic) PipeRead \
    "xwd -silent -id $[w.id] | convert -scale $$(($[w.width]/5)) -frame 1x1 \
    -mattecolor black -quality 0 xwd:- png:$[fvwm_tmp]/icon.tmp.$[w.id].png \
    && echo Nop"
+ I TestRc (Match) Test (f $[fvwm_icon]/$[w.iconfile], f $[fvwm_tmp]/icon.tmp.$[w.id].png) \
    PipeRead "composite -geometry +2+4 \
    $[fvwm_icon]/$[w.iconfile] $[fvwm_tmp]/icon.tmp.$[w.id].png \
    $[fvwm_tmp]/icon.tmp.$[w.id].png && \
    echo WindowStyle IconOverride, Icon $[fvwm_tmp]/icon.tmp.$[w.id].png || echo Nop"
+ I TestRc (NoMatch) WindowStyle IconOverride, Icon $[fvwm_tmp]/icon.tmp.$[w.id].png
+ I Iconify

DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
+ I UnsetEnv Icon-$[w.id]
+ I Exec rm -f $[fvwm_tmp]/icon.tmp.$[w.id].png

I also have:

*FvwmEvent: deiconify DeThumbnail

A couple of problems, though.

  • I am not sure if the DeThumbnail -function ever runs… Shouldnt it delete the file: $[fvwm_tmp]/icon.tmp.$[w.id].png ?? It doesn’t… I am not sure I understand what $[w.id].png means, but hey…

When I’ve Iconified something I get a file like “icon.tmp.0x20003e.png” in that direcotory, but when I de-iconify it, that file doesnt dissapear… :roll:

— Another thing I cant get to work is the “composite” thing, which seems real cool;

from zensites.net/fvwm/guide/adva … tions.html

…this just doesnt happen for me. I have:

Style "firefox" Icon 48x48/firefox.png

…but I dont get an “icon” with both images “compisited” together. I just get the screenshot…

Any help would be greatly appreciated.

fvwm is way cool. 8)

Well, do you have a line in your StartFunction that looks like this:

+ I Module FvwmEvent

(Note that really you should be using an alias such as:

DestroyModuleConfig FvwmEvent-dethumbnail
*FvwmEvent-dethumbnail: deiconify DeThumbnail

AddToFunc StartFunction I Module FvwmEvent-dethumbnail

Since although *FvwmEvent as a module-alias will work, it won’t allow you to define other events easily. But that’s a moot point in this regard, and for your issue).

$[w.id] returns the hexadecimal representation of the window. All windows that are mapped to the screen are given one. In this context though it’s used to generate a (somewhat, although not completley) unique filename for the MiniIcon that gets assigned to the window.

See above. Check your StartFunction for:

 + I Module FvwmEvent

– Thomas Adam

:blush: — no I had (accidentally) commented that out. Woops. :unamused:

Thanks!

Any thoughts on why the composite thing doesnt work? I am guessing it has something to do with the fact that my “Style” definition isnt correct?

Use FvwmIdent to check that “firefox” really is the name/class/resource of
this specific window. You will ideally want to match on its Class, which
for Firefox might be:

Firefox-bin

Use this in your style line, then composite icons (in all their uglyness)
should work. Note that when matching window in style lines, they’re
case-sensitive. See the following for more information:

edulinux.homeunix.org/~n6tadam/f … styles.txt

– Thomas Adam

ok, I’ve tried a bunch of things now, including:

Style "*" Icon 48x48/firefox.png

…but it still doesnt work…

I’ve also tried to put a full path to the icon – same result…

…as a matter of fact, when I do a normal Iconify on something other than firefox, I get completely different icons. I have no idea where fvwm gets these definitions from as I haven’t (knowingly) made any such definitions…

Maybe I should start over from scratch… :frowning:

ok – this is driving me crazy now.

I have the two following lines in my config:

Style "Eterm" NoTitle, BorderWidth 0, HandleWidth 0, Icon /home/ja/.fvwm/icons/48x48/x.png Style "xterm" NoTitle, BorderWidth 0, HandleWidth 0, Icon /home/ja/.fvwm/icons/48x48/x.png

…but when I iconize an Eterm, I get a Different Icon!! I dont get it!

I’ve also noticed that applications like xcalc have “default” icons… where are these defined?

It will be a long night, it seems… :open_mouth:

Three things about those two lines above (and in no particular order):

  1. You don’t need the quotes.
  2. You need to check the window names to make sure they match.
  3. STYLE NAMES ARE CASE SENSITIVE.

I’m not really shouting with point 3. – I just wanted to make sure you realised that as most do not. Now, Assuming you want to match all instances of XTerm and ETerm, match by class. (Most terminal emulators set their class to that of XTerm, but not all). If you want individual xterms, then you will want to define them thus (and after the specific case):

[code]Style mynicexterm …

Exec exec xterm -T mynicexterm
[/code]

… for instance. The other thing to bear in mind is that some applications like to hold onto their own predefined icon, hence you might want to try (in ETerm’s case, especially):

Style ETerm NoTitle, BorderWidth 0, HandleWidth 0, IconOverride, Icon /home/ja/.fvwm/icons/48x48/x.png

It’s IconOverride which tells the client that you really do want a new icon for it.

See above.

These will be found in a location in your ImagePath (perhaps) – although most icons for X applications are just bitmaps often “built” into the application. If you assign an Icon to an application (as you have done with ETerm above), then you can always do something like:

Pick Exec exec xconsole $[w.iconfile]

… from FvwmConsole on some application to tell you what the iconfile the application is using.

– Thomas Adam

Hey Thomas!

…Maybe I’m too stupid for fvwm. :frowning: – (or maybe I should read the manpage from top to bottom?)

“IconOverride” helped. A bit. The first time I iconify an Eterm, it gets the correct Icon. But the second time and thereafter, its back to the original (wrong) one.

and I still havent been able to get the “composite”-thingy working. :blush:

…I’ve been looking for a good template-config which has all the basics working, but all I can find are real complicated configs…
Can you point me in the right direction in finding a good basic config with which I could get started?

Thanx a lot for your help… :smiley:

Probably won’t help you. It’s not the knowledge, it’s the application of it that fails most people. You’re certainly not too stupid for FVWM. It just requires time, patience, and the help of others (where appropriate) to answer questions. Not everyone ultimately learns by reading man pages, as they rarely tell you how to fit the pieces together.

If by this you mean the thumbnail, then you might want to add another
Style line command to your ETerm line that says:

CirculateSkip

… which tells conditions commands (such as ‘All’ and ‘ThisWindow’) not
to consider them. Since these conditional commands are used in the
thumbnail script, this ought to help you a little.

If FVWM logs to ~/.xsession-errors, see if there’s anything in there that
might help.

Start by trawling through the screenshots and configs section of this
forum. I don’t use any of the features you’re requesting, alas. I know
others do though.

– Thomas Adam

I fiddled with this today again. I actually ended up rewriting my whole config… 8)

Anyways … the issues with getting “composite icons” to work had to do with the fact that the line:

+ I TestRc (Match) Test (f $[fvwm_icon]/$[w.iconfile], f $[fvwm_tmp]/icon.tmp.$[w.id].png)

…looked for the icon-file in the wrong place. Using a command like

Pick Exec exec echo $[w.iconfile]

helped in figuring this out.

Pick Echo $[w.iconfile]

… would have sufficed.

Thomas.