NAME

Gnome2::Backgrounds - Helper module for managing wallpapers in GNOME

VERSION

version 0.01

SYNOPSIS

use feature 'say';
use Gnome2::Backgrounds;

my $backgrounds = Gnome2::Backgrounds -> new;

# print a list of filenames of JPEG backgrounds
my $jpg_bg = $backgrounds -> backgrounds('.jpg');

foreach (@$jpg_bg) {
  say $_ -> {'filename'};
}

# set the default background
$backgrounds -> set('my_background.jpg');

# or
$backgrounds -> set('/path/to/my_background.jpg');

DESCRIPTION

Gnome2::Backgrounds is a simple module to help managing wallpapers under the GNOME2 desktop environment.

METHODS

new( config => 'some/file/backgrounds.xml' )

Parses a backgrounds.xml file (default $HOME/.gnome2/background.xml) and returns a Gnome2::Backgrounds object.

backgrounds( $name )

Returns a list of background names matching $name.

info( $names )

Returns a list of hash ref containing information about $names background (where names are valid background names). The following fields are set:

filename
options
scolor
shade_type
deleted
pcolor

set( $name )

Sets $name background (where name is a valid background name, or the path to an image file) as default background.

AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

LICENSE AND COPYRIGHT

Copyright 2011 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.