[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Javascript to change the default wallpaper in plasma
From:       Marco Martin <notmart () gmail ! com>
Date:       2016-07-28 9:59:34
Message-ID: CAD6_Boswt04Ey9bHxpzG3MeDV5y5N8ERh4OM+B09kHwM4XLjYg () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jul 25, 2016 at 9:01 PM, Raphael Hertzog <hertzog@debian.org> wrote:
>     d = desktops()
>
>     for (i in d) {
>         d[i].wallpaperPlugin = 'org.kde.image'
>         d[i].currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General')
>         d[i].writeConfig('Image',
>                 'file:///usr/share/images/desktop-base/desktop-background')
>         d[i].writeConfig('FillMode', '2')          //enables croping
>     }
>
> But it doesn't seem to work and I don't know why. It's possible that the script
> is not executed at all...

the script is correct.
you have to make sure the file actually exists looks suspicious that
does't have an extension, for instance on the local installation here
i have
/opt/kde5qt5/share/wallpapers/ColorfulCups/contents/images/1920x1080.jpg

that means i do:
d[i].writeConfig("Image",
"file:///opt/kde5qt5/share/wallpapers/ColorfulCups/contents/images/1920x1080.jpg");

since it's a wallpaper in the plasma wallpaper format with a kpackage
layout and multiple resolutions, i can do as well:
d[i].writeConfig("Image", "ColorfulCups");

but d[i].writeConfig("Image",
"file:///opt/kde5qt5/share/wallpapers/ColorfulCups") wouldn't work
--
Marco Martin
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic