Re: FVWM: DynamicPopupAction :-)

From: jpkotta <sqrt_-1_at_ezrs.com>
Date: Wed, 02 Mar 2005 22:02:27 -0600

On Tue, 01 Mar 2005 21:49:25 -0500, Dan Espen <dane_at_mk.telcordia.com>
wrote:

> Michelle Konzack <linux4michelle_at_freenet.de> writes:
>> Hello *,
>>
>> For soe hours I have tried the first time the Example in the
>> fvwm2 manpage reading a Directory with JPEG's dynamicly...
>>
>> Nice, but too boring :-)
>>
>> Now I have thumbs shown in the menu...
>>
>> How it works... not on the fly, because if you have pics like me...
>>
>> <http://michelle.konzack.home.tamay-dogan.homelinux.net/bash/>
>>
>> and look at "tdmakexpms" around the end of the page.
>>
>> Oh yes, you need "netpbm" to create the thumbs... and "xloadimage"
>> to put the picture on your root. The default Directory is ~/wall.
>>
>> Do not ask me how the menus are looking on a 1600x1200 Screen...
>> I do not know, how many pics I have.
>
> When I tried to download tdmakexpms, I got file not found.
>
> Anyway, I built the xpms myself. I have a lot of root images so my
> image menus break them down by type, "animals", "space", "planes",
> etc. Even with that, I still have lots of menus that are 4 or 5 deep.
> I don't use dynamic menus, it's way too slow.
>
> I gave your dynamic menu script a try with my setup.
> Taking a screenshot of the dynamic menu fully expanded was a challenge
> but I finally got it:
>
> http://mywebpages.comcast.net/despen/menu.jpg
>
>

That's quite an impressive screenshot! I see some pictures that I have as
well, mostly space ones.

So here's my dynamic wallpaper menu. I basically grifted taviso's and
built upon it. It dynamically generates thumbnails from directories it
hasn't visited, and caches them for future use. It will also clean things
out if the cache gets too big (this part needs some tweaking). I've tried
to make it as efficient as possible for uncached directories, and the
conversion can run in the background so it will not freeze fvwm (this part
needs some tweaking as well). It uses ImageMagick convert.

Here's a screenshot:
http://www.lynucs.org/index.php?screen_type=1&screen_id=451790615420af227999cc&m=screen

################################################################################
# WALLPAPER
################################################################################

DestroyMenu Wallpaper
AddToMenu Wallpaper
+ MissingSubmenuFunction WallpaperBrowser
+ "Wallpaper%mini.folder.xpm%" Popup
/home/jpkotta/pics/wallpaper
+ "Home%mini.folder.xpm%" Popup /home/jpkotta
+ "Refresh Wallpaper%mini.display.xpm%" ResetWallpaper

# defines a popup menu built from the directory given in $0 (must be the
full path)
# sends files to SetWallpaper
# title sends $0 to StartImageViewer
# dynamically builds a menu with with fvwm-menu-directory with thumbnails
of image files as the icons
# auto generates thumbnails if they don't exist or are older than the file
# this is based on taviso's WallpaperBrowser function, but I added extra
logic to it and put it in a script
DestroyFunc WallpaperBrowser
AddToFunc WallpaperBrowser
+ I PipeRead '$[FVWM_USERDIR]/thumb_menu.sh $0'

DestroyFunc SetWallpaper
AddToFunc SetWallpaper
+ I Exec Esetroot -fit -center $0
+ I Exec echo $0 > $HOME/tmp/current_wallpaper

DestroyFunc ResetWallpaper
AddToFunc ResetWallpaper
+ I Exec Esetroot -fit -center `cat $HOME/tmp/current_wallpaper`




--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Mar 03 2005 - 09:31:49 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:57 BST