X11::Muralis - Perl module to display wallpaper on your desktop.
This describes version 0.03 of X11::Muralis.
use X11::Muralis; my $obj = X11::Muralis->new(%args);
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 "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.
Create a new object, setting global values for the object.
my $obj = X11::Muralis->new( config_dir=>"$ENV{HOME}/.muralis", is_image => qr/.(gif|jpeg|jpg|tiff|tif|png|pbm|xwd|pcx|gem|xpm|xbm)/i, );
$dr->list_images();
$dr->list_images(match=>'animals', list=>'fullname');
List all the images which match the match-string. (prints to STDOUT)
Arguments:
Limit the images which match the given string.
Give the list format. If not defined or empty or "normal", will do a "normal" listing, which gives the directory names followed by the files. If 'fullname' then it will list all the files with their full names (and doesn't list the directory names).
Print the list to the given file rather than to STDOUT.
$obj->display_image(%args);
Centre the image on the root window.
Limit the number of colours used to display the image. This is useful for a 256-colour display.
The image will be zoomed to fit the size of the screen.
If using the --list or --random options, limit the image(s) to those which match the string.
Pick a random image to display. If --match is given, limit the selection to images in directories which match the match-string.
Display the last image which was displayed. This is useful to re-display an image while overriding the default display options.
Rotate the image by 90, 180 or 270 degrees.
Smooth the image (useful if the image has been zoomed).
Tile the image to fill the root window.
Print informational messages.
Enlarge or reduce the size of the image by the given percent.
my $count = $dr->count_images();
my $count = $dr->count_images(match=>'animals');
Counts all the images.
Optional argument: match => string
Counts the images which match the string.
my @files = $self->get_image_files();
my @files = $self->get_image_files( match=>$match, exclude=>$exclude unseen=>1);
Get a list of matching image files.
If 'unseen' is true, then get the file names from the ~/.muralis/unseen file, if it exists.
my @dirs = $self->get_dirs();
Asks xloadimage what it thinks the image directories are.
Get info about the root window. This uses xwininfo.
Find the full name of the nth (matching) file starting the count from 1.
Get the name of a random file.
Find the full filename of an image file.
Use the options passed in or figure out the best default options. Return a string containing the options.
$options = $obj->get_display_options($filename, %args);
Save the name of the image most recently displayed. Also update the "unseen" file if 'unseen' is true.
Image::Info File::Basename Test::More
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}
perl(1).
Please report any bugs or feature requests to the author.
Kathryn Andersen (RUBYKAT) perlkat AT katspace dot com http://www.katspace.org/tools/muralis
Copyright (c) 2005-2006 by Kathryn Andersen
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install X11::Muralis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm X11::Muralis
CPAN shell
perl -MCPAN -e shell install X11::Muralis
For more information on module installation, please visit the detailed CPAN module installation guide.