Guido Berhoerster
Mon, 05 Jan 2004 12:29:30 -0800
Hello, some time ago I wrote a little perl script in order to set a random background image and recently I added some features and made an Fvwm module out of it. It's called FvwmRandomBack and it's pretty simple but for me it does what it is supposed to do and I thought that maybe someone else might find it useful. I put it up for download at http://www.guido-berhoerster.org/downloads/ (at the bottom of the page). FvwmRandomBack depends on the Image::Magick perl module which is part of ImageMagick (http://www.imagemagick.org). In order to install FvwmRandomBack simply put it somewhere within Fvwm's ModulePath and make it execuatble. Here is its included manpage: ----snip---- NAME FvwmRandomBack - a FVWM module to display a random image in the root window SYNOPSIS Module FvwmRandomBack FvwmRandomBack can only be invoked by fvwm. Command line invocation of the module will not work. DESCRIPTION FvwmRandomBack recursively searches a directory for all images in GIF, JPEG, PNG, or XPM format, selects one randomly and displays it in the root window. If the image is bigger than the current viewport it will be resized and cropped accordingly. Otherwise it will either be tiled or optionally magnified. FvwmRandomBack uses ImageMagick's perl module in order to modify and convert the image and fvwm-root to set the root window. INVOCATION FvwmRandomBack can be invoked by fvwm with the command 'Module FvwmRandomBack' at any time. After setting the root window to a random image it will exit. It might be convenient to invoke FvwmRandomBack during initialization by adding AddToFunc StartFunction I Module FvwmRandomBack to the fvwm configuration file. FvwmRandomBack needs to be executable and must reside in a directory which is listed in ModulePath. OPTIONS *FvwmRandomBack: ImagePath path The path where the images can be found. *FvwmRandomBack: TmpDir path Specifies the directory where a temporary copy of the image will be stored in. *FvwmRandomBack: Magnify Magnify images which are smaller than the current viewport instead of tiling them. *FvwmRandomBack: RetainPixmap Causes FvwmBacker to retain and publish the Pixmap with which the background has been set. For more information see the FvwmTheme manpage and the fvwm-root manpage. AUTHOR Guido Berhoerster <[EMAIL PROTECTED]> ----snap---- I'm not a perl hacker and I have hardly any experience in writing Fvwm modules in perl, thus I would very much welcome any feedback. -- Guido Berhoerster [EMAIL PROTECTED] http://www.guido-berhoerster.org/ -- 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 [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]