Re: DIfferent bg's across workspaces? Re: What is command line for backgrounds in Gnome2.2?



On Fri, 2003-04-18 at 12:21, Paul E Johnson wrote:
> Thanks very much for this pointer. It works great. I've written a Perl 
> script that changes the background every 30 minutes. It makes computing 
> more interesting. I'll gladly post the perl script in case anybody wants 
> it. It is very simple.

I posted a similar script recently. I've since changed it so that it is
more likely to pick new pictures than old ones. This way I get to see my
recent pictures :-)

(see below)

> Now I wonder whether gconftool can send a different image to the 
> different workspaces under gnome.  If it could do that, I'd have one 
> workspace for forest scenes, one for waterfalls, one for people's faces, 
> and so forth. That way, Gnome could completely handle the things that I 
> used to count on Window Maker for.

My guess is that the only way to do that at the moment would be to have
the window manager tell a script to switch the background when you
switch desktops -- not ideal at all.

Also, OSX blends from one image to the next when they are set to change
periodically. I'd imagine that could be done with some ImageMagick, but
again, it wouldn't be the ideal solution.

--Ben


#!/usr/bin/perl
 
$dir = "/home/ben/Documents/pix/backgrounds/activeBackgrounds/";
 
@files = `ls -t ${dir}*.JPG ${dir}*.jpg`;
 
#they are sorted by date. There are (1+$#files) of them. We want to lean
towards the recent ones.
my $base = 1.1;
$tmp = ($base ** rand(log(2)/log($base)) - 1);
 
$filename = $files[int($tmp*($#files+1))];
chomp($filename);
 
system("gconftool-2", "--type", "string", "--set",
"/desktop/gnome/background/picture_options", "scaled");
system("gconftool-2", "--type", "string", "--set",
"/desktop/gnome/background/picture_filename", $filename);

 
> pj
> 
> 
> Håvard Wigtil wrote:
> > On Thu, 2003-02-27 at 11:04, Paul Johnson wrote:
> > 
> >>I have a perl script I use with WindowMaker to change backgrounds every 
> >>20 minutes and it draws backgrounds randomly from a directory structure. 
> >>  Since Gnome-2.2 won't cooperate with WindowMaker, I want to use 
> >>Gnome-2.2's background command to do it.
> >>
> >>Can you please tell me what the command should be?
> > 
> > 
> > Use this  command (on one line ;)
> > 
> > gconftool-2 --set --type=string
> > /desktop/gnome/background/picture_filename /full/path/to/image/file.type
> > 
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]