NAME

X11::Muralis - Perl module to display wallpaper on your desktop.

VERSION

This describes version 0.01 of X11::Muralis.

SYNOPSIS

use X11::Muralis;

my $obj = X11::Muralis->new(%args);

DESCRIPTION

The X11::Muralis module (and accompanying script, 'muralis') displays a given image file on the desktop background (that is, the root window) of an X-windows display.

This tries to determine what size would best suit the image; whether to show it fullscreen or normal size, whether to show it tiled or centred on the screen. Setting the options overrides this behaviour.

One can also repeat the display of the last-displayed image, changing the display options as one desires.

This uses the xloadimage program to display the image file. This will display images from the directories given in the "path" section of the .xloadimagerc file.

This also depends on xwininfo to get information about the root window.

The Name

The name "muralis" comes from the Latin "muralis" which is the word from which "mural" was derived. I just thought it was a cool name for a wallpaper script.

METHODS

new

set

$dr->set(dir_match=>'animals');

$dr->set(verbose=>1);

$dr->set(verbose=>1, tile=>1);

Set values for this object. These will be remembered for when display_image is called. See display_image for definitions of the arguments which can be used.

list_images

$dr->list_images();

$dr->list_images(dir_match=>'animals');

List all the images in the (matching) image directories. (prints to STDOUT)

Optional argument: dir_match => string

Limit the directories which are used to those which match the given string.

Note that if dir_match is set here, then it remains set for later methods unless it is explicitly set to an empty string.

count_images

my $count = $dr->count_images();

my $count = $dr->count_images(dir_match=>'animals');

Counts all the images in the (matching) image directories.

Optional argument: dir_match => string

If image directories are defined, then limit the directories which are used, to those which match the given string.

Note that if dir_match is set here, then it remains set for later methods unless it is explicitly set to an empty string.

display_image

Private Methods

get_dirs

my @dirs = $self->get_dirs();

my @dirs = $self->get_dirs(dir_match=>$match);

Asks xloadimage what it things the image directories are. Filters these by dir_match if required.

get_root_info

Get info about the root window

find_nth_file

Find the full name of the nth file uses dirs, dir_match

get_random_file

Get the name of a random file

find_fullname

Find the full filename of an image file

get_display_options

Use the options passed in or figure out the best default options. Return a string containing the options.

save_last_displayed

Save the name of the image most recently displayed.

REQUIRES

Image::Info
Test::More

INSTALLATION

To install this module, run the following commands:

perl Build.PL
./Build
./Build test
./Build install

Or, if you're on a platform (like DOS or Windows) that doesn't like the "./" notation, you can do this:

perl Build.PL
perl Build
perl Build test
perl Build install

In order to install somewhere other than the default, such as in a directory under your home directory, like "/home/fred/perl" go

perl Build.PL --install_base /home/fred/perl

as the first step instead.

This will install the files underneath /home/fred/perl.

You will then need to make sure that you alter the PERL5LIB variable to find the modules, and the PATH variable to find the script.

Therefore you will need to change: your path, to include /home/fred/perl/script (where the script will be)

PATH=/home/fred/perl/script:${PATH}

the PERL5LIB variable to add /home/fred/perl/lib

PERL5LIB=/home/fred/perl/lib:${PERL5LIB}

SEE ALSO

perl(1).

BUGS

Please report any bugs or feature requests to the author.

AUTHOR

Kathryn Andersen (RUBYKAT)
perlkat AT katspace dot com
http://www.katspace.com

COPYRIGHT AND LICENCE

Copyright (c) 2005 by Kathryn Andersen

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.