Default wallpaper theming for Plasma 5
This commit is contained in:
9
Makefile
9
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
|
||||
|
||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -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
|
||||
|
||||
|
||||
17
debian/postinst
vendored
17
debian/postinst
vendored
@@ -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
|
||||
|
||||
15
debian/prerm
vendored
15
debian/prerm
vendored
@@ -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
|
||||
|
||||
33
defaults/plasma5/desktop-base.js
Normal file
33
defaults/plasma5/desktop-base.js
Normal file
@@ -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 <http://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.
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
[KSplash]
|
||||
Theme=lines
|
||||
Engine=KSplashQML
|
||||
Reference in New Issue
Block a user