summaryrefslogtreecommitdiff
path: root/user/adelie-kde-theme/adelie-kde-theme.js
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-15 22:05:49 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-15 22:06:08 +0000
commitd1ba3b521c32759829b7816a7bd45a5bd092c1bc (patch)
tree8bfbc53e41c294ff344d4d78dc4bd57f1881b058 /user/adelie-kde-theme/adelie-kde-theme.js
parent7a77b262ed0a91b879e934353f368ae2679c51e4 (diff)
downloadpackages-d1ba3b521c32759829b7816a7bd45a5bd092c1bc.tar.gz
packages-d1ba3b521c32759829b7816a7bd45a5bd092c1bc.tar.bz2
packages-d1ba3b521c32759829b7816a7bd45a5bd092c1bc.tar.xz
packages-d1ba3b521c32759829b7816a7bd45a5bd092c1bc.zip
user/adelie-kde-theme: update theme
Diffstat (limited to 'user/adelie-kde-theme/adelie-kde-theme.js')
-rw-r--r--user/adelie-kde-theme/adelie-kde-theme.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/adelie-kde-theme/adelie-kde-theme.js b/user/adelie-kde-theme/adelie-kde-theme.js
new file mode 100644
index 000000000..596d386b5
--- /dev/null
+++ b/user/adelie-kde-theme/adelie-kde-theme.js
@@ -0,0 +1,33 @@
+// Copyright 2016 Aurélien COUDERC <zecoucou@free.fr>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+// This script is provided by desktop-base
+// It is run by Plasma 5 on upgrade.
+// Plasma checks that the script is only run once for each version.
+desktops = desktops()
+
+for (desktop in desktops) {
+ // Only set up the wallpaper if the plugin is the default.
+ // Otherwise it means the user chose another plugin and we don’t want to override that.
+ if (desktops[desktop].wallpaperPlugin == 'org.kde.image') {
+ desktops[desktop].currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General')
+ if (!desktops[desktop].readConfig('Image')) {
+ // Only set up the wallpaper if the wallpaper image is empty (=default).
+ // Otherwise it means the user selected a picture and we don’t want to override that.
+ desktops[desktop].writeConfig('Image', 'Sunset');
+ }
+ }
+}
+