diff --git a/Makefile b/Makefile index dd9d749..86db531 100644 --- a/Makefile +++ b/Makefile @@ -41,12 +41,8 @@ install-local: $(INSTALL) $(PIXMAPS) $(DESTDIR)/usr/share/pixmaps/ # KDE Config - mkdir -p $(DESTDIR)/usr/share/desktop-base/profiles/kde-profile/share/config - $(INSTALL) $(wildcard profiles/kde-profile/share/config/*) $(DESTDIR)/usr/share/desktop-base/profiles/kde-profile/share/config mkdir -p $(DESTDIR)/usr/share/kde4/config $(INSTALL) profiles/kde-profile/kdeglobals $(DESTDIR)/usr/share/kde4/config - mkdir -p $(DESTDIR)/usr/share/kde4/apps/plasma-desktop/init/ - $(INSTALL) kde-wallpaper/10-desktop-base.js $(DESTDIR)/usr/share/kde4/apps/plasma-desktop/init/ # KDE Wallpaper ## Joy @@ -65,10 +61,13 @@ install-local: $(INSTALL) $(wildcard kde-wallpaper/joy_inksplat/contents/images/*) $(DESTDIR)/usr/share/wallpapers/joy_inksplat/contents/images/ - ## SDDM meta theme (configured with alternatives) + # SDDM meta theme (configured with alternatives) install -d $(DESTDIR)/usr/share/sddm/themes/debian-theme $(INSTALL) $(wildcard sddm-debian/*) $(DESTDIR)/usr/share/sddm/themes/debian-theme + # Set Plasma 5/KDE default wallpaper + install -d $(DESTDIR)/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates + $(INSTALL) defaults/plasma5/desktop-base.js $(DESTDIR)/usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/ ## Joy install -d $(DESTDIR)/usr/share/desktop-base/joy-theme diff --git a/debian/changelog b/debian/changelog index e3d82fe..c5786aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,9 +2,10 @@ desktop-base (9.0.0~exp1) UNRELEASED; urgency=medium [ Aurélien COUDERC ] * Initial support for Soft Waves theme by Juliette Belin. - - Default theme for GRUB. (Closes: #598776, #773369) - - Default theme Gnome wallpaper and lock screen - - Theme available for SDDM login and Plasma 5 wallpaper and lock screen + - Default theme for GRUB (Closes: #598776, #773369) + - Default theme for Gnome wallpaper and lock screen + - Default theme for Plasma 5 wallpaper (Closes: #831730) + - Theme available for SDDM login and lock screen - debian/copyright updated * Initial support for global theme switching via alternatives diff --git a/debian/postinst b/debian/postinst index 2ccf3c9..6ebd71a 100644 --- a/debian/postinst +++ b/debian/postinst @@ -98,6 +98,23 @@ EOF done << EOF softwaves 40 lines 30 +EOF + + # Set up an alternative for the wallpaper for Plasma 5/KDE + # Highest priority for active theme + update-alternatives --install \ + /usr/share/wallpapers/DebianTheme \ + desktop-plasma5-wallpaper \ + /usr/share/desktop-base/active-theme/wallpaper 50 + # Alternatives for theme packages + while read theme priority; do + update-alternatives --install \ + /usr/share/wallpapers/DebianTheme \ + desktop-plasma5-wallpaper \ + /usr/share/desktop-base/$theme-theme/wallpaper $priority + done << EOF +softwaves 40 +lines 30 EOF # Login theme diff --git a/debian/prerm b/debian/prerm index 92da828..334a788 100644 --- a/debian/prerm +++ b/debian/prerm @@ -76,6 +76,21 @@ EOF desktop-lockscreen.xml \ /usr/share/desktop-base/active-theme/lockscreen/gnome-background.xml + # Remove Plasma 5/KDE wallpaper alternatives + # For theme packages + while read theme; do + update-alternatives --remove \ + desktop-plasma5-wallpaper \ + /usr/share/desktop-base/$theme-theme/wallpaper + done << EOF +softwaves +lines +EOF + # *Last* remove *highest priority* alternative for active theme + update-alternatives --remove \ + desktop-plasma5-wallpaper \ + /usr/share/desktop-base/active-theme/wallpaper + # Remove login theme alternatives # For theme packages # Alternative for theme packages diff --git a/defaults/plasma5/desktop-base.js b/defaults/plasma5/desktop-base.js new file mode 100644 index 0000000..b3446c8 --- /dev/null +++ b/defaults/plasma5/desktop-base.js @@ -0,0 +1,33 @@ +// Copyright 2016 Aurélien COUDERC +// +// 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 . + +// 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. +d = desktops() + +for (i in d) { + // 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 user’s choice. + if (d[i].wallpaperPlugin == 'org.kde.image') { + d[i].currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General') + if (!d[i].readConfig('Image')) { + // Only set up the wallpaper if the wallpaper image is empty (=default). + // Otherwise it means the user select a picture and we don’t want to override user’s choice. + d[i].writeConfig('Image', 'DebianTheme'); + } + } +} + diff --git a/kde-wallpaper/10-desktop-base.js b/kde-wallpaper/10-desktop-base.js deleted file mode 100644 index 60abbbe..0000000 --- a/kde-wallpaper/10-desktop-base.js +++ /dev/null @@ -1,14 +0,0 @@ -// Placed in /usr/share/kde4/apps/plasma-desktop/init/ -// This script is run for new users, which do not have a .kde directory -// and it set's the default wallpaper for all activities - -a = activities() - -for (i in a) { - a[i].wallpaperPlugin = 'image' - a[i].wallpaperMode = 'SingleImage' - a[i].currentConfigGroup = Array('Wallpaper', 'image') - a[i].writeConfig('wallpaper', - '/usr/share/images/desktop-base/desktop-background') - a[i].writeConfig('wallpaperposition', '2') //enables croping -} diff --git a/profiles/kde-profile/share/config/ksplashrc b/profiles/kde-profile/share/config/ksplashrc deleted file mode 100644 index 6e6ff5e..0000000 --- a/profiles/kde-profile/share/config/ksplashrc +++ /dev/null @@ -1,3 +0,0 @@ -[KSplash] -Theme=lines -Engine=KSplashQML