This commit is contained in:
Stephan Raabe 2023-12-21 18:30:37 +01:00
parent ca6bb890d1
commit a9f2357752

View File

@ -53,16 +53,15 @@ if gum confirm "Do you want to enable/update to sddm-git?" ;then
echo "File /etc/sddm.conf.d/sddm.conf updated."
if [ -f /usr/share/sddm/themes/sugar-candy/theme.conf ]; then
if [ -f ~/.cache/current_wallpaper.jpg ]; then
sudo cp ~/.cache/current_wallpaper.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
else
sudo cp wallpapers/default.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg
echo "Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
fi
# Cache file for holding the current wallpaper
sudo cp wallpapers/default.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg
echo "Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
sudo cp sddm/theme.conf /usr/share/sddm/themes/sugar-candy/
sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.jpg"'/' /usr/share/sddm/themes/sugar-candy/theme.conf
echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/"
fi
elif [ $? -eq 130 ]; then
exit 130