Setting default wallpaper with a script

Aaron J. Seigo aseigo at kde.org
Tue May 4 18:38:30 CEST 2010


On May 4, 2010, Antony Loebs wrote:
> So I've continued to play around with scripting the default Plasma desktop
> (with JavaScript) and have a quick question: how can I set the wallpaper? I
> tried the following
> ---
> var activity = new Activity("desktop");
> activity.currentConfigGroup = new Array("Wallpaper");
> activity.writeConfig("wallpaper",
> "/usr/share/wallpapers/Default_wallpaper/");
> ---
> but with no joy.

the wallpaper doesn't get notified of the change; in fact, i only added any 
sort of real wallpaper support in 4.5 with the wallpaperPlugin and 
wallpaperMode properties for Activity objects.

still ... what is probably needed is a way to write to the wallpaper config 
itself and catch when that happens. and when it does, trigger a reload on the 
wallpaper.

... which i've just implemented. your code above works in 4.5.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100504/dd31263d/attachment.sig 


More information about the Plasma-devel mailing list