Disable unwanted backgrounds in KDE

This commit is contained in:
Daniel Ruiz de Alegría 2021-10-27 12:54:54 +02:00
parent de194a02a1
commit 9e7446660e
No known key found for this signature in database
GPG Key ID: 59667A77E8BFCB6C
2 changed files with 26 additions and 9 deletions

View File

@ -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

View File

@ -39,12 +39,15 @@ case "$1" in
--remove "$file"
done
# Recover disabled gnome backgrounds
for file in /usr/share/gnome-background-properties/disabled/*; do
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 "$(echo $file | sed 's|/disabled||')"
--remove "$dir/$(basename $file)"
done
rmdir "$dir"
done
rmdir /usr/share/gnome-background-properties/disabled/
;;
esac