Easiest Thumnails Ever!

Great!
Thanks :slight_smile:

But what is the bug? :slight_smile:

Dunno yet :smiley: But if I can make it happen, I can make it go away :wink:

This was a previous post, I switched debug mode to 1 and I got this:

art_render_invoke: no image source given
art_render_invoke: no image source given
art_render_invoke: no image source given
art_render_invoke: no image source given
aterm: can't load font "8x10"
### DEBUG: Debug Level set to 1
### DEBUG: raw skip list = torsmo
### DEBUG: 	token = torsmo
### DEBUG: cooked skip list = ^torsmo$
art_render_invoke: no image source given
### DEBUG: name = ~ (Scanning) 
### DEBUG: name = ~
### DEBUG: res_name = rox-filer
### DEBUG: res_class_name = Rox-filer
art_render_invoke: no image source given
### DEBUG: name = Mousepad

in my .xsession-errors file… What does the art render invoke mean? This is my FvwmThumbnail config:

DestroyModuleConfig FvwmThumbnail: * *FvwmThumbnail: Debug 1 *FvwmThumbnail: Directory /home/sabmann/fthumb *FvwmThumbnail: SkipList torsmo *FvwmThumbnail: Mode Auto # automatically take thumbs *FvwmThumbnail: Refresh 5 *FvwmThumbnail: Class Icons, Factor 0.15x0.15 *FvwmThumbnail: Class Icons, Command \ "WindowId %w WindowStyle IconOverride, Icon %i" *FvwmThumbnail: Class Pager, ScaleTo 35x35 *FvwmThumbnail: Class Pager, Command \ "WindowId %w WindowStyle EWMHMiniIconOverride, MiniIcon %i"

I really want your module working because I like the eyecandy :smiley: HELP

I’m not sure. It’s not a function I call, so I’m guessing that it’s an ImageMagick/PerlMagick function. Which makes me wonder if your version of ImageMagick downgraded on the reinstall. What version are you rinning, do you know?

synaptic tels me i’m running version 6:6.06.2-2.1ubuntu (imagemagick and perlmagick have the same version. I thought it ment I had 6.2.2 or something… but then I checked the version with \

$ convert -v

That told me I had ImageMagick version 6.0.6… so I’m going to reinstall ImageMagick and PerlMagick by compiling the tar files and not using Synaptic…

I just checked version 6.2.3-0 is the latest version, I’ll try it if it doesnt work i’m going to try 6.2.2… I’ll post the result

It seems 6.2.3 doesn’t work… compiling 6.2.2 now

That’s the one that I have installed. Times like this, I can see why the GraphicsMagick fork got launched…

This has nothing to do with FvwmThumbnail. That message is from a Gtk+ theme you are using. Is it SVG based?

I get the same message from my Gtk2 theme but have been too lazy to really work on it and I can never remember my account info at gnomelook.org so I have not been able to email the author and find out why that is. I seem to be the only one who gets that message using his particular them…but any way I digress.

The message is probably from Gtk not from FvwmThumbnail
[/quote]

I am having troubles again using FvwmThumbnail. I am sure that it is due to my configuration but I havn’t figured it out. I had been using this a while back and then stopped using it (I don’t remember why) and I lost my original config.

But how I want it to work is if I click on the button on the titlebar it will minimize and show a the icon on the desktop.

It is not doing that.

Here is what I have.

[code]*FvwmThumbnail: Mode Manual
*FvwmThumbnail: Refresh 0
*FvwmThumbnail: Directory /home/catherine/.fvwm/fvwm_thumbs

*FvwmThumbnail: Class Icons, Factor 0.2x0.2
*FvwmThumbnail: Class Icons, Command “WindowId %w WindowStyle IconOverride, Icon %i”

*FvwmThumbnail: Class Pager, ScaleTo 27x27
*FvwmThumbnail: Class Pager, Command “WindowId %w WindowStyle EWMHMiniIconOverride, MiniIcon %i”
*FvwmThumbnail: GenerateOn raise_window
*FvwmThumbnail: DeleteOn destroy_window windowshade iconify
*FvwmThumbnail: SkipList X-Launch
Mouse 1 6 A ThisWindow SendToModule FvwmThumbnail Thumbnail $[w.id]

[/code]

It is quite possible that it never worked that way but since I don’t remember how I had it set up, I don’t know.

Help! :cry:

Well, I loaded your config and it seemed to work as expected.

I did notice your mouse binding takes an image, but it doesn’t do the iconification. So from what you describe it could be taking the image fine but since it never gets the iconize command, nothing seems to happen.

Nah, couldn’t be that simple.

Yes, it does make the thumnail of the window and replaces my mini icon with the thumbnail. I don’t know how to get the window to iconify to the desktop

If I put this in the FvwmThumbnail config *FvwmThumbnail: Command "Iconify" It becomes two step process. The snapshot is taken and then I have to click the window again to get it to iconify to the desktop. Where am i supposed to tell fvwm or this module to iconify so it goes to the desktop

You could write a function for your window button:

DestroyFunc FuncThumbnailAndIconify
AddToFunc FuncThumbnailAndIconify

  • I SendToModule FvwmThumbnail Thumbnail $[w.id]
  • I Iconify

Although that may have race condition problems. A Wait may help if so.

thanks, I think I understand now. My confusion was in thinking that the Module itself iconified the thumbnails to the desktop.

I still have another try to get this module working…

AddToFunc StartFunction
+ I Module FvwmAnimate
+ I Module FvwmThumbnail
+ I Module FvwmEvent
+ I Module FvwmButtons FvwmButtonsDock
+ I Exec exec fvwm-root --retain-pixmap $[fvwm_images]/arbol.png
Mouse 1     I       A   Iconify
Mouse 2     I       A   Move

Mouse 1     1       A   Menu MenuFvwmWindowOps
Mouse 1     2       A   Close
Mouse 3     1       A   Menu MenuFvwmwindowOps
Mouse 1     6       A   ThisWindow SendToModule FvwmThumbnail Thumbnail $[w.id]
Mouse 1     4       A   Maximize grow grow
Mouse 3     4       A   Maximize

Mouse 1     FS      A   ResizeFunc
Mouse 2     W       C   ResizeFunc
Mouse 1     W       M   MoveFunc
Mouse 3     W       M   ResizeFunc
Mouse 3     TSIF    A   RaiseLower
Mouse 3     T       A   Menu MenuFvwmWindowOps

Mouse 3     R       A   Exec exec $[FVWM_TERMINAL]
Mouse 1     R       A   Menu MenuFvwmRoot
Mouse 4     T       A   WindowShade True
Mouse 5     T       A   WindowShade False 

AddToFunc ResizeFunc "M" Resize
AddToFunc MoveFunc   "M" Move
ModulePath $[FVWM_MODULEDIR]:$[HOME]/.fvwm/modules
ImagePath $[fvwm_images]:$[fvwm_thumbs]:+

# Set environment variables
SetEnv fvwm_configuration	$[FVWM_USERDIR]/configuration
SetEnv fvwm_module_conf		$[FVWM_USERDIR]/configuration/modules
SetEnv fvwm_menu_conf		$[FVWM_USERDIR]/configuration/menu
SetEnv fvwm_images		$[FVWM_USERDIR]/images
SetEnv fvwm_icons		$[fvwm_images]/icons
SetEnv fvwm_dock_icons		$[fvwm_images]/dock-icons
SetEnv fvwm_deco		$[fvwm_images]/deco
SetEnv fvwm_thumbs		/home/sabmann/.fvwm/images/.thumbs
DestroyModuleConfig FvwmThumbnail: *

*FvwmThumbnail: Mode Manual
*FvwmThumbnail: Refresh 0
*FvwmThumbnail: Directory /home/sabmann/.fvwm/images/.thumbs

*FvwmThumbnail: Class Icons, Factor 0.2x0.2
*FvwmThumbnail: Class Icons, Command "WindowId %w WindowStyle IconOverride, Icon  %i"

*FvwmThumbnail: Class Pager, ScaleTo 27x27
*FvwmThumbnail: Class Pager, Command "WindowId %w WindowStyle EWMHMiniIconOverride, MiniIcon %i"
*FvwmThumbnail: GenerateOn raise_window
*FvwmThumbnail: DeleteOn destroy_window windowshade iconify
*FvwmThumbnail: SkipList torsmo

I can see the module is working, because in the .thumbs folder i can see the thumbnails, but when I try to minimize a window, nothing happens…
help!

Hi, I don’t know if the english is a bt difficult or what but I tryed the diferrent configuration of all this pages, and I can’t get the module work
I’ve copy the FvwmThumbnail to /home/blue/.fvwm/modules
In my config there are this:

[code]
AddToFunc StartFunction

  • I Exec exec $[fvwm_root] $[fvwm_wallpaper]
  • I Test (Restart) All (Iconic) Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png
  • I Module FvwmCommandS
  • I Module FvwmProxy
  • I Module FvwmAnimate
  • I Module FvwmBacker
  • I Module FvwmEvent
  • I Module FvwmButtons macDock
  • I Exec exec /usr/libexec/gnome-settings-daemon &
  • I Module FvwmThumbnail # your module [/code]

And I’ve put the configuration that have been wroten in the first post:

[code]DestroyModuleConfig FvwmThumbnail: *

*FvwmThumbnail: Refresh 5
*FvwmThumbnail: Directory /home/nick/lab/fvwm_thumbs

*FvwmThumbnail: Class Pager, ScaleTo 27x27
*FvwmThumbnail: Class Pager, Command “WindowId %w WindowStyle EWMHMiniIconOverride, MiniIcon %i”

*FvwmThumbnail: Class Icons, Factor 0.2x0.2
*FvwmThumbnail: Class Icons, Command “WindowId %w WindowStyle IconOverride, Icon %i”

*FvwmThumbnail: Class BigPager, Factor 0.166666x0.166666

AddToFunc StartFunction + I Module FvwmThumbnail[/code]

Well, I know that I’ve to set the name function to the minimize button window, but I don’t know who is the name. With the taviso config I have this

Mouse 1 2 A Close
Mouse 1 1 A Menu MenuFvwmWindowOps Nop
Mouse 1 6 A thumbnail
Mouse 1 4 A Maximize

And when I click on the minimize button window, work!
So if the module called FvwmThumbnail I think that the name of the funtion too, so I change the config like this

Mouse 1 2 A Close
Mouse 1 1 A Menu MenuFvwmWindowOps Nop
Mouse 1 6 A FvwmThumbnail
Mouse 1 4 A Maximize

But this doesn’t work.

On the other hand, I don’t know how to configure the pager to see the screenshots icons in the windows of pager

Thanks in advance! and sorry for my english

Where can I download that module, link in the original post is broken…

I fixed the link, it was a phpBB issue, apparently it considers all the links not starting with a protocol to be relative to the forum root…

Thanks, Dragon. I meant to get to it, but I was at work when I read saw it and forgot when I got home and… it’s been a busy month.

Anyway, thanks

This is fun!

I just downloaded it (ehem, one hour ago? it’s almost three now…) and played a little with it. Amazing!

I played a bit with the snippets from the “Efficient Thumbnails here” thread before, but now I wanted overlayed mini-icons together with the thumbnailed mini icons and could not get it right in pure fvwmese.

Your module had a little logic error in the overlay code which was easy to fix and I added an option “BigOverlay” that overlays the icon file instead of the minicon, but now that I’ve got it working, I prefer the mini icons.

I downloaded your module tonight, so I hope my patch will still work for you:

--- FvwmThumbnail.old	2005-11-05 03:01:31 +0100
+++ FvwmThumbnail	2005-11-05 02:36:04 +0100
@@ -71,6 +71,7 @@
 		delete_events	=> '@',			# to trigger deletion
 		debug		=> '$',			# enable debug chatter
 		overlay_flag	=> '$',			# if true for any class
+		big_overlay_flag => '$',			# if true for any class
 	]
 );
 
@@ -215,17 +216,21 @@
 			next;
 		};
 
-		/Overlay/i and do {
+		(/Overlay/i or /BigOverlay/i) and do {
 			unless($arg =~ /\+(\d+)\+(\d+)/) {
 				$mdata->module->showError(
 					"can't parse overlay geometry '$arg'"
 				);
 				next;
 			}
-			$scaler->overlay_flag(1);
-			$mdata->overlay_flag(1);
 			$scaler->overlay_x($1);
 			$scaler->overlay_y($2);
+                        $scaler->overlay_flag(1);
+                        if (/BigOverlay/i) {
+                            $mdata->big_overlay_flag(1);
+                        } elsif (/Overlay/i) {
+                            $mdata->overlay_flag(1);
+                        }
 			next;
 		};
 #
@@ -721,19 +726,29 @@
 #	now - we may need to preserve the original mini icon and generate an
 #	image object from it.
 #
-#	before we get into all that, let's make sure it's necessary
-#
-	return unless $mdata->overlay_flag;
-	return if $win_data->{ orig_mini_icon_name };
-	my $filename = find_image($win_data->{mini_icon_name});
-	return unless $filename;
-	return if $filename =~ /^ewmh_mini_icon$/;;
-	return if $filename =~ /0x\d+\.png/;
+	if (($mdata->overlay_flag or $mdata->big_overlay_flag)
+            and not $win_data->{ orig_mini_icon_image } ) {
+            # If the flag is set, generate an overlay
+            my $filename;
+            unless ($win_data->{ orig_mini_icon_name }) { # no preserved icon?
+                if ($mdata->overlay_flag) {
+                    $filename = find_image($win_data->{mini_icon_name});
+                } elsif ($mdata->big_overlay_flag) {
+                    $filename = find_image($win_data->{icon_file_name});
+                }
 #
 #	a bit of chatter, help see what's happening...
 #
+                if ($filename) {
 	$module->debug("preserving '$filename'\n");
 	$win_data->{ orig_mini_icon_name } = $filename;
+                }
+            } else {
+                $filename = find_image($win_data->{orig_mini_icon_name});
+            }
+            if ($filename) {
+                unless ($filename =~ /^ewmh_mini_icon$/ or
+                        $filename =~ /0x\d+\.png/) {
 #
 #	create a new Image object
 #
@@ -744,6 +759,9 @@
 #	and since we're already playing silly buggers with the winlist...
 #
 	$win_data->{ orig_mini_icon_image } = $image;
+                }
+            }
+        }
 #
 #	last of all, the thumbnail
 #
@@ -780,6 +798,7 @@
 				   ],
 		delete_events	=> [ 	M_DESTROY_WINDOW ],
 		overlay_flag 	=> 0,
+		big_overlay_flag => 0
 	);
 #
 #	process config data from fvwm

It’s nice that putting the code into module doesn’t slow fvwm down at all, however when I was playing with the imlib code posted elsewhere, I got the impression that it is much faster than xwd + libmagick. After all my puny athlon 550 is happy about spare cpu cycles. Maybe I’ll see what perl + imlib can do tomorrow.

Kind regards and good night :slight_smile:

wow. thanks for that, I’ll merge that in once I’ve had a chance to wake up

As for imlib, I must have had a play with it at some point because I can remember coming to the same conclusion. The main reason I didn’t use the same approach was that people using thumbnails on Fvwm tend to have ImageMagik installed, if only because they start using taviso’s thumbnailing code, and I didn’t want anyone to have to install anything new.

I suppose the solution is to have a set of driver classes for the backend and use whichever one has support.

Hmmmm…