#!/bin/sh

set -e

FILES_TO_DIVERT="
/etc/gtk-2.0/gtkrc
/etc/lightdm/lightdm-gtk-greeter.conf
/etc/plymouth/plymouthd.conf
/etc/sddm.conf.d/kde_settings.conf
/etc/xdg/compton.conf
/etc/xdg/gtk-3.0/settings.ini
/etc/xdg/kdeglobals
/etc/xdg/konsolerc
/etc/xdg/kscreenlockerrc
/etc/xdg/kwinrc
/etc/xdg/plasmarc
/etc/xdg/qt5ct/qt5ct.conf
/etc/xdg/qterminal.org/qterminal.ini
/etc/xdg/Trolltech.conf
/etc/xdg/xfce4/helpers.rc
/etc/xdg/xfce4/panel/default.xml
/etc/xdg/xfce4/terminal/terminalrc
/etc/xdg/xfce4/whiskermenu/defaults.rc
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
/etc/xdg/Thunar/uca.xml
/etc/xdg/Thunar/accels.scm
/etc/xdg/yakuakerc
" # END FILES_TO_DIVERT

case "$1" in
    remove)
	for file in $FILES_TO_DIVERT; do
	    rm -f "$file"
	    dpkg-divert --rename --package kali-themes \
	            --divert "$file.original" \
		    --remove "$file"
	done
    ;;
esac

#DEBHELPER#
