Files
desktop-base/debian/prerm
T

134 lines
4.6 KiB
Bash

#!/bin/sh -e
set -e
#DEBHELPER#
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
# Remove background alternatives for active theme
update-alternatives --remove desktop-background /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg
# Remove background alternatives for theme packages
while read theme filename; do
update-alternatives --remove \
desktop-background \
/usr/share/desktop-base/$theme-theme/wallpaper/contents/images/$filename $priority
done << EOF
softwaves 1280x720.svg
softwaves 1920x1080.svg
softwaves 2560x1440.svg
EOF
# Remove old background alternatives
for background in \
lines-wallpaper_1280x1024.svg \
lines-wallpaper_1600x1200.svg \
lines-wallpaper_1920x1080.svg \
lines-wallpaper_1920x1200.svg \
lines-wallpaper_2560x1080.svg \
joy-wallpaper_1600x1200.svg \
joy-wallpaper_1600x1200.svg \
joy-wallpaper_1280x1024.svg \
joy-wallpaper_1920x1080.svg \
joy-wallpaper_1920x1200.svg \
joy-inksplat-wallpaper_1920x1080.svg \
spacefun-wallpaper.svg \
spacefun-wallpaper-widescreen.svg \
moreblue-orbit-wallpaper.svg \
moreblue-orbit-wallpaper-widescreen.svg \
; do
update-alternatives --remove desktop-background /usr/share/images/desktop-base/$background
done
# Remove desktop-background.xml alternatives
# For active theme
update-alternatives --remove \
desktop-background.xml \
/usr/share/desktop-base/active-theme/wallpaper/gnome-background.xml
# For theme packages
while read theme; do
update-alternatives --remove \
desktop-background.xml \
/usr/share/desktop-base/$theme-theme/wallpaper/gnome-background.xml $priority
done << EOF
softwaves
EOF
# For old alternatives
for desktopbackground in \
lines.xml \
joy.xml \
; do
update-alternatives --remove desktop-background.xml /usr/share/images/desktop-base/$desktopbackground
done
# Remove desktop-lockscreen.xml alternatives
# For active theme
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/desktop-base/active-theme/lockscreen/gnome-background.xml
# For theme packages
while read theme; do
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/desktop-base/$theme-theme/lockscreen/gnome-background.xml $priority
done << EOF
softwaves
EOF
# Remove login theme alternatives
# For active theme
update-alternatives --remove \
desktop-sddm-preview \
/usr/share/desktop-base/active-theme/sddm-preview.jpg
update-alternatives --remove \
desktop-login-background \
/usr/share/desktop-base/active-theme/backgrounds/login.svg
# For theme packages
# Alternative for theme packages
while read theme; do
update-alternatives --remove \
desktop-sddm-preview \
/usr/share/desktop-base/$theme-theme/sddm-preview.jpg
update-alternatives --remove \
desktop-login-background \
/usr/share/desktop-base/$theme-theme/backgrounds/login.svg
done << EOF
softwaves
EOF
# For old alternatives
## Lines
### secondary alternatives
update-alternatives --remove desktop-sddm-preview \
/usr/share/desktop-base/lines-theme/sddm-preview.jpg
### main alternatives
update-alternatives --remove desktop-login-background \
/usr/share/desktop-base/lines-theme/login-background.svg
update-alternatives --remove desktop-login-background \
/usr/share/desktop-base/lines-theme/login-background-no-logo.svg
## Joy
### secondary alternatives
update-alternatives --remove desktop-sddm-preview \
/usr/share/desktop-base/joy-theme/sddm-preview.jpg
### main alternatives
update-alternatives --remove desktop-login-background \
/usr/share/desktop-base/joy-theme/login-background.svg
# remove grub alternatives
for background in \
lines-grub.png \
lines-grub-1920x1080.png \
joy-grub.png \
spacefun-grub.png \
spacefun-grub-widescreen.png \
; do
update-alternatives --remove desktop-grub /usr/share/images/desktop-base/$background
done
# Remove theme package alternatives
while read theme; do
update-alternatives --remove \
desktop-theme \
/usr/share/desktop-base/$theme-theme
done << EOF
softwaves
EOF
update-alternatives --remove desktop-theme /
fi