How Can I change wallpaper from CLI?

Aaron J. Seigo aseigo at kde.org
Wed Sep 5 22:26:32 BST 2012


On Wednesday, September 5, 2012 20:42:55 Gilles Caulier wrote:
> There a task assigned to a student this summer to open Plasma API for
> wallpaper purpose. I mentored him to patch Plasma and write relevant
> Kipi plugin for digiKam.

honestly, it would make a lot more sense for applications that show content to 
use KActivities::ResourceInstance so that applications can see what the active 
content is.

what that would do in this case is instead of implementing (non-standard) 
means to set desktop wallpapers in N applications, N applications simply start 
advertising what content the user is focused on so that other parts of the 
system can react.

that way instead of dozens of different plugins for dozens of applications to 
do something as inane and rarely used as "set this random image i'm viewing to 
be my wallpaper" using a menu item (it's already possible with drag and drop), 
Share Like Connect could simply offer an item when a image with a supported 
mimetype is selected / viewed.

then nobody needs to worry about plasma shell internals (which can even differ 
between shells, btw, and has changed over time in some shells making 
maintaining such publicly used dbus APIs a PITA) and nobody needs to keep 
writing new plugins for this stuff.

extra bonus is that we'd then be able to do actually useful things for free 
like make it simple to post an image to one's microblog account or add the 
image (or whatever document / data / information) to an activity or ....

and how hard is it?

using namespace KActivities;
m_resource = new ResourceInstance(window->wId(), this);

... some time later ...

m_resource->setUri(m_currentImage);
m_resource->setTitle(m_imageTitle);
m_resource->setMimetype(m_imageMimetype);

voila.

show me a dbus api for wallpaper setting that can do that. :)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120905/7e6ee355/attachment.sig>
-------------- next part --------------
_______________________________________________
Plasma-devel mailing list
Plasma-devel at kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the kde-core-devel mailing list