applying of sddm theme fixed

This commit is contained in:
JaKooLit 2025-02-24 00:15:57 +09:00
parent dadfea04ba
commit 45a8cbf224

View File

@ -74,12 +74,20 @@ if git clone --depth 1 "$source_theme" "$theme_name"; then
fi
done
else
# If the directory doesn't exist, create it and set up the new theme
echo "$CAT - $sddm_conf_dir not found, creating..." | tee -a "$LOG"
sudo mkdir -p "$sddm_conf_dir" 2>&1 | tee -a "$LOG"
fi
echo -e "[Theme]\nCurrent=$theme_name" | sudo tee "$sddm_conf_dir/theme.conf.user" 2>&1 | tee -a "$LOG"
echo "Created and configured $sddm_conf_dir/theme.conf.user with theme $theme_name" | tee -a "$LOG"
if [ ! -f "$sddm_conf_dir/theme.conf.user" ]; then
echo -e "[Theme]\nCurrent = $theme_name" | sudo tee "$sddm_conf_dir/theme.conf.user" > /dev/null
if [ -f "$sddm_conf_dir/theme.conf.user" ]; then
echo "Created and configured $sddm_conf_dir/theme.conf.user with theme $theme_name" | tee -a "$LOG"
else
echo "Failed to create $sddm_conf_dir/theme.conf.user" | tee -a "$LOG"
fi
else
echo "$sddm_conf_dir/theme.conf.user already exists, skipping creation." | tee -a "$LOG"
fi
# Replace current background from assets