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;
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.
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:
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…
Three things about those two lines above (and in no particular order):
You don’t need the quotes.
You need to check the window names to make sure they match.
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):
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.
…Maybe I’m too stupid for fvwm. – (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.
…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?
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.