Page 1 of 1

Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 15 Nov 2011, 02:40
by Kriss
Hi all!
I'm trying to properly place background image for this program so if KDE4 wallpaper is stretched, I'd like to do the same for abovementioned program.
But so far I've been unable to retrieve any information on wallpaper palcement aside from image that is used for it (and even this information isn't accurate enough since there are quite many "wallpaper=" in config file):

Code: Select all

grep 'wallpaper=/' ~/.kde4/share/config/plasma-desktop-appletsrc | sed  's/wallpaper=//' | sed q
I've tried to change wallpaper placement method and look for changes in configuration but no file was changed.
Also I've heard about qdbus but found it too complicated (although I was able to get some irrelevant info, I didn't find something related to wallpapers).

Does anybody know how to get information about KDE4 wallpaper placement for a script?

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 15 Nov 2011, 10:49
by beny
the wallpaper place location usr/share/wallpaper and you can manage picture from desktop setting or desktop preference via right click on mouse in the desktop.

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 15 Nov 2011, 11:24
by Kriss
Thanks!
I'm sorry for being unclear, the command from my first post gets information about wallpaper location. But I can't understand where to find information about its placement on the screen. Was it cropped, was it stratched or something else. I want to create some sort of script (like the one above) to get this information.

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 15 Nov 2011, 17:40
by brokenman
Most of this info (for 32bit anyway) can be found in your home folder:

Code: Select all

kdskrc=/home/guest/.kde/share/config/kdesktoprc

grep WallpaperMode $kdskrc|awk -F= '{print$NF}'

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 15 Nov 2011, 22:22
by Kriss
Thanks brokenman!
Regrettably you're talking about KDE3 =(

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 16 Nov 2011, 15:10
by brokenman
Is there any other?

Your example above is ok for getting wallpaper but may be difficult for setting. I found this:

I will boot into 64bit and play around but for now have you tried kreadconfig/kwriteconfig?

Code: Select all

kreadconfig --file plasma-desktop-appletsrc

kwriteconfig --file plasma-desktop-appletsrc --key wallpaper <path-to-wallpaper>
Also this may be a solution for you:
http://kde-look.org/content/show.php/Sc ... ent=115147

Re: Where to get info about KDE4 wallpaper (Scaled/Cropped)?

Posted: 16 Nov 2011, 20:39
by Kriss
Thanks brokenman!
I'll check these options.
I'm not trying to set wallpapers, I'm just trying to simulate transparency for conky.
You can see examples of code for KDE3 here
Edit: sadly, no luck...