From 45a8cbf224c4d835283508750dfeef1b76bcd824 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 24 Feb 2025 00:15:57 +0900 Subject: [PATCH] applying of sddm theme fixed --- install-scripts/sddm_theme.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install-scripts/sddm_theme.sh b/install-scripts/sddm_theme.sh index 2cdc5e8..54981c7 100755 --- a/install-scripts/sddm_theme.sh +++ b/install-scripts/sddm_theme.sh @@ -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