#!/bin/sh
set -e

if [ "$1" = "remove" ]; then
    # Remove vendor logos alternative, all slaves get removed automatically
    update-alternatives --remove \
            vendor-logos \
            /usr/share/desktop-base/kali-logos

    # Remove background alternatives for theme packages
    update-alternatives --remove \
	desktop-background \
	/usr/share/desktop-base/kali-theme/wallpaper/contents/images/3840x2160.png

    # Remove desktop-background.xml alternatives
    update-alternatives --remove \
	desktop-background.xml \
	/usr/share/desktop-base/kali-theme/wallpaper/gnome-background.xml

    # Remove desktop-lockscreen.xml alternatives
    update-alternatives --remove \
	desktop-lockscreen.xml \
	/usr/share/desktop-base/kali-theme/lockscreen/gnome-background.xml

    # Remove Plasma 5/KDE wallpaper alternatives
    update-alternatives --remove \
	desktop-plasma5-wallpaper \
	/usr/share/desktop-base/kali-theme/wallpaper

    # Remove login theme alternatives
    update-alternatives --remove \
	desktop-login-background \
	/usr/share/desktop-base/kali-theme/login/background.svg

    # Remove GRUB alternatives
    update-alternatives --remove \
	desktop-grub \
	/usr/share/grub/themes/kali/grub-4x3.png
    update-alternatives --remove \
	desktop-grub \
	/usr/share/grub/themes/kali/grub-16x9.png

    # Remove theme package alternatives
    update-alternatives --remove \
	desktop-theme \
	/usr/share/desktop-base/kali-theme
fi

#DEBHELPER#
