This commit is contained in:
Stephan Raabe 2024-06-24 17:23:17 +02:00
parent 6250bba6bc
commit fb2731d62b

View File

@ -63,10 +63,15 @@ if [ -z "${dmsel}" ] ;then
fi
if [ "$dmsel" == "Install sddm and theme" ] ;then
if [ -d /usr/share/sddm/themes/sugar-candy/ ] ;then
rm -rf /usr/share/sddm/themes/sugar-candy/
echo ":: Sugar Candy folder removed"
fi
disman=0
# Try to force the installation of sddm
echo ":: Install sddm"
yay -S --noconfirm sddm --ask 4
yay -S --noconfirm sddm sddm-sugar-candy-git --ask 4
# Enable sddm
if [ -f /etc/systemd/system/display-manager.service ]; then
@ -74,6 +79,26 @@ if [ "$dmsel" == "Install sddm and theme" ] ;then
fi
sudo systemctl enable sddm.service
if [ ! -d /etc/sddm.conf.d/ ]; then
sudo mkdir /etc/sddm.conf.d
echo "Folder /etc/sddm.conf.d created."
fi
sudo cp sddm/sddm.conf /etc/sddm.conf.d/
echo "File /etc/sddm.conf.d/sddm.conf updated."
if [ -f /usr/share/sddm/themes/sugar-candy/theme.conf ]; then
# 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 [ "$dmsel" == "Deactivate current display manager" ] ;then
sudo rm /etc/systemd/system/display-manager.service