more robust approach in installing sddm to avoid newbie move

This commit is contained in:
JaKooLit 2025-02-09 10:35:34 +09:00
parent 174149c11b
commit d096c34be3
2 changed files with 19 additions and 1 deletions

View File

@ -60,6 +60,24 @@ if git clone --depth 1 "$source_theme" "$theme_name"; then
sudo cp -r assets/sddm.png "/usr/share/sddm/themes/$theme_name/backgrounds/default" 2>&1 | tee -a "$LOG"
sudo sed -i 's|^wallpaper=".*"|wallpaper="backgrounds/default"|' "/usr/share/sddm/themes/$theme_name/theme.conf" 2>&1 | tee -a "$LOG"
printf "\n%.0s" {1..1}
printf "${NOTE} copying ${YELLOW}JetBrains Mono Nerd Font${RESET} to ${YELLOW}/usr/local/share/fonts${RESET} .......\n"
printf "${NOTE} necessary for the new SDDM theme to work properly........\n"
sudo mkdir -p /usr/local/share/fonts/JetBrainsMonoNerd && \
sudo cp -r "$HOME/.local/share/fonts/JetBrainsMonoNerd" /usr/local/share/fonts/JetBrainsMonoNerd
if [ $? -eq 0 ]; then
echo "Fonts copied successfully."
else
echo "Failed to copy fonts."
fi
# Update font cache and log the output
fc-cache -v -f 2>&1 | tee -a "$LOG"
printf "\n%.0s" {1..1}
echo "${OK} - ${MAGENTA}Additional SDDM Theme${RESET} successfully installed." | tee -a "$LOG"
else

View File

@ -211,7 +211,7 @@ ask_yes_no "-Install & configure ${YELLOW}SDDM${RESET} as login manager?" sddm
# check if any known login managers are active when users choose to install sddm
if [ "$sddm" == "y" ] || [ "$sddm" == "Y" ]; then
# List of services to check
services=("gdm.service" "gdm3.service" "lightdm.service" "xdm.service" "lxdm.service")
services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service")
# Loop through each service
for svc in "${services[@]}"; do