From 9e7446660e41da4be8ef38286da486c7a4de21a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ruiz=20de=20Alegr=C3=ADa?= Date: Wed, 27 Oct 2021 12:54:54 +0200 Subject: [PATCH] Disable unwanted backgrounds in KDE --- debian/kali-themes.postinst | 18 ++++++++++++++++-- debian/kali-themes.postrm | 17 ++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/debian/kali-themes.postinst b/debian/kali-themes.postinst index df427e3f..cd06ec21 100644 --- a/debian/kali-themes.postinst +++ b/debian/kali-themes.postinst @@ -103,9 +103,9 @@ if [ "$1" = "configure" ]; then # Install remaining new files install_all fi - # Disable some backgrounds in gnome desktop - mkdir -p /usr/share/gnome-background-properties/disabled/ + # Disable some backgrounds in Gnome and KDE while read file; do + mkdir -p "$(dirname $file)/disabled" dpkg-divert --rename --package kali-themes \ --divert "$(dirname $file)/disabled/$(basename $file)" \ --add "$file" @@ -119,6 +119,20 @@ if [ "$1" = "configure" ]; then /usr/share/gnome-background-properties/debian-softwaves.xml /usr/share/gnome-background-properties/debian-spacefun.xml /usr/share/gnome-background-properties/gnome-backgrounds.xml +/usr/share/wallpapers/FuturePrototype +/usr/share/wallpapers/FuturePrototypeWithLogo +/usr/share/wallpapers/homeworld +/usr/share/wallpapers/homeworld_wallpaper +/usr/share/wallpapers/Joy +/usr/share/wallpapers/JoyInksplat +/usr/share/wallpapers/JoyLockScreen +/usr/share/wallpapers/Lines +/usr/share/wallpapers/LinesLockScreen +/usr/share/wallpapers/moonlight +/usr/share/wallpapers/MoonlightLockScreen +/usr/share/wallpapers/SoftWaves +/usr/share/wallpapers/SoftWavesLockScreen +/usr/share/wallpapers/SpaceFun EOF # Configure /root/.face to have a red-background avatar if [ ! -e /root/.face ]; then diff --git a/debian/kali-themes.postrm b/debian/kali-themes.postrm index f85634c3..01c6f217 100644 --- a/debian/kali-themes.postrm +++ b/debian/kali-themes.postrm @@ -38,13 +38,16 @@ case "$1" in --divert "$file.original" \ --remove "$file" done - # Recover disabled gnome backgrounds - for file in /usr/share/gnome-background-properties/disabled/*; do - dpkg-divert --rename --package kali-themes \ - --divert "$file" \ - --remove "$(echo $file | sed 's|/disabled||')" - done - rmdir /usr/share/gnome-background-properties/disabled/ + # Recover disabled gnome backgrounds + for dir in /usr/share/gnome-background-properties/ \ + /usr/share/wallpapers/; do + for file in "$dir"/disabled/*; do + dpkg-divert --rename --package kali-themes \ + --divert "$file" \ + --remove "$dir/$(basename $file)" + done + rmdir "$dir" + done ;; esac