//
// Set the PureOS default wallpaper on Plasma
//
// Copyright 2021 Matthias Klumpp <matthias.klumpp@puri.sm>
// SPDX-License-Identifier: LGPL-3.0+

var d = desktops();
for (i in d) {
    d[i].currentConfigGroup = ['Wallpaper', 'org.kde.image', 'General'];
    d[i].writeConfig('Image', '/usr/share/wallpapers/PureOS/');
}

var lockerCfg = ConfigFile(ConfigFile(ConfigFile(ConfigFile('kscreenlockerrc', 'Greeter'), 'Wallpaper'), 'org.kde.image'), 'General');
lockerCfg.writeEntry('Image', '/usr/share/wallpapers/PureOS/');
lockerCfg.writeEntry('PreviewImage', '/usr/share/wallpapers/PureOS/');
