Looking for help!
NAME
X11::Muralis - Perl module to display wallpaper on your desktop.
VERSION
This describes version 0.02 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
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,
);
list_images
$dr->list_images();
$dr->list_images(match=>'animals', list=>'fullname');
List all the images which match the match-string. (prints to STDOUT)
Arguments:
- match => string
-
Limit the images which match the given string.
- listformat => 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).
- outfile => filename
-
Print the list to the given file rather than to STDOUT.
display_image
$obj->display_image(%args);
Arguments:
- center=>1
-
Centre the image on the root window.
- colors=>num
-
Limit the number of colours used to display the image. This is useful for a 256-colour display.
- fullscreen=>1
-
The image will be zoomed to fit the size of the screen.
- match=>string
-
If using the --list or --random options, limit the image(s) to those which match the string.
- random=>1
-
Pick a random image to display. If --match is given, limit the selection to images in directories which match the match-string.
- repeat_last=>1
-
Display the last image which was displayed. This is useful to re-display an image while overriding the default display options.
- rotate=>degrees
-
Rotate the image by 90, 180 or 270 degrees.
- smooth=>1
-
Smooth the image (useful if the image has been zoomed).
- tile=>1
-
Tile the image to fill the root window.
- verbose=>1
-
Print informational messages.
- zoom=>percent
-
Enlarge or reduce the size of the image by the given percent.
Private Methods
count_images
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.
get_image_files
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.
get_dirs
my @dirs = $self->get_dirs();
Asks xloadimage what it thinks the image directories are.
get_root_info
Get info about the root window. This uses xwininfo.
find_nth_file
Find the full name of the nth (matching) file starting the count from 1.
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.
$options = $obj->get_display_options($filename, %args);
save_last_displayed
Save the name of the image most recently displayed. Also update the "unseen" file if 'unseen' is true.
REQUIRES
Image::Info
File::Basename
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.org/tools/muralis
COPYRIGHT AND LICENCE
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.