From 452ae0ab3d558c073c3a8275f9113d57e0617b6a Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 08:45:43 +0000 Subject: [PATCH 1/7] Screen.ScreenWidth -> Screen.width Screen.width ishte correct property --- Main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.qml b/Main.qml index af53482..ab72fec 100644 --- a/Main.qml +++ b/Main.qml @@ -15,7 +15,7 @@ Pane { id: root height: config.ScreenHeight || Screen.height - width: config.ScreenWidth || Screen.ScreenWidth + width: config.ScreenWidth || Screen.width padding: config.ScreenPadding LayoutMirroring.enabled: config.RightToLeftLayout == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft From f70ec128d1e546213808e1b472e107f47c52062f Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 08:51:37 +0000 Subject: [PATCH 2/7] config keys use Background, || fallback is redundant --- Main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.qml b/Main.qml index ab72fec..6ff8ec3 100644 --- a/Main.qml +++ b/Main.qml @@ -243,7 +243,7 @@ Pane { player.play(); } else{ - backgroundImage.source = config.background || config.Background + backgroundImage.source = config.background } } } From cf1a69788bcbfb3bd79e085910073b10eda0f1f6 Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 08:58:51 +0000 Subject: [PATCH 3/7] config.PauseBackground returns a boolean so no ternary required --- Main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.qml b/Main.qml index 6ff8ec3..5bf9143 100644 --- a/Main.qml +++ b/Main.qml @@ -227,7 +227,7 @@ Pane { Image.AlignBottom : Image.AlignVCenter speed: config.BackgroundSpeed == "" ? 1.0 : config.BackgroundSpeed - paused: config.PauseBackground == "true" ? 1 : 0 + paused: config.PauseBackground == "true" fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit asynchronous: true cache: true From a9394af9a55ba8fdaefbc85ff51131a383022f2f Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 09:00:23 +0000 Subject: [PATCH 4/7] "" around $METADATA to allow paths with space --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 9ea1f68..608e5c7 100755 --- a/setup.sh +++ b/setup.sh @@ -188,7 +188,7 @@ preview_theme(){ fi - local theme="$(sed -n 's|^ConfigFile=Themes/\(.*\)\.conf|\1|p' $METADATA)" + local theme="$(sed -n 's|^ConfigFile=Themes/\(.*\)\.conf|\1|p' "$METADATA")" info "Preview closed ($theme theme found)." info "Log file: $log_file" } From bd89bb755d9ca341818d3b51cfef6fe1c048794b Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 10:00:17 +0000 Subject: [PATCH 5/7] Replace hardcoded path in preview_theme() with user defined at top of setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 608e5c7..c6002e5 100755 --- a/setup.sh +++ b/setup.sh @@ -172,7 +172,7 @@ enable_sddm() { preview_theme(){ local log_file="/tmp/${THEME_NAME}_$DATE.txt" - sddm-greeter-qt6 --test-mode --theme /usr/share/sddm/themes/sddm-astronaut-theme/ > $log_file 2>&1 & + sddm-greeter-qt6 --test-mode --theme $THEMES_DIR/$THEME_NAME > $log_file 2>&1 & greeter_pid=$! # wait for ten seconds From ee974c6ec88773ae1eec550df5f849784304b34b Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 11:42:27 +0000 Subject: [PATCH 6/7] =?UTF-8?q?Null=20guard=20if=20(!config.Background)=20?= =?UTF-8?q?return=20prevents=20the=20TypeError=20config.background=20?= =?UTF-8?q?=E2=86=92=20config.Background=20fixes=20the=20lowercase=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Main.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Main.qml b/Main.qml index 5bf9143..62ed9bc 100644 --- a/Main.qml +++ b/Main.qml @@ -235,6 +235,7 @@ Pane { mipmap: true Component.onCompleted:{ + if (!config.Background) return var fileType = config.Background.substring(config.Background.lastIndexOf(".") + 1) const videoFileTypes = ["avi", "mp4", "mov", "mkv", "m4v", "webm"]; if (videoFileTypes.includes(fileType)) { @@ -243,7 +244,7 @@ Pane { player.play(); } else{ - backgroundImage.source = config.background + backgroundImage.source = config.Background } } } From 849b69edbedbc8219414ba99dfad9cad70fbeed7 Mon Sep 17 00:00:00 2001 From: mcgi5sr2 Date: Mon, 2 Mar 2026 12:00:13 +0000 Subject: [PATCH 7/7] =?UTF-8?q?clone=5Frepo,=20now=20backup=20replaced=20w?= =?UTF-8?q?ith=20rm=20-rf=20so=20we=20don't=20spam=20the=20/usr/share/sddm?= =?UTF-8?q?/theme=20dir=20if=20we=20run=20the=20install=20multiple=20times?= =?UTF-8?q?=20echo=20replaced=20with=20printf=20to=20avoid=20whitespace=20?= =?UTF-8?q?install=5Ftheme:=20backup=20replaced=20with=20rm=20-rf,=20accep?= =?UTF-8?q?ts=20optional=20src,=20lists=20available=20themes=20after=20ins?= =?UTF-8?q?tall=20install=5Flocal:=20installs=20from=20script's=20own=20di?= =?UTF-8?q?rectory=20cleanup=5Fclone:=20removes=20~/sddm-astronaut-theme?= =?UTF-8?q?=20on=20demand=20Menu=20updated=20with=20=F0=9F=94=84=20Install?= =?UTF-8?q?=20Local=20Theme=20and=20=F0=9F=97=91=EF=B8=8F=20Clean=20Up=20C?= =?UTF-8?q?lone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.sh | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index c6002e5..d3c7116 100755 --- a/setup.sh +++ b/setup.sh @@ -119,20 +119,20 @@ install_deps() { # Clone repository clone_repo() { - [[ -d "$PATH_TO_GIT_CLONE" ]] && mv "$PATH_TO_GIT_CLONE" "${PATH_TO_GIT_CLONE}_$DATE" + [[ -d "$PATH_TO_GIT_CLONE" ]] && rm -rf "$PATH_TO_GIT_CLONE" spin "Cloning repository..." git clone -b master --depth 1 "$THEME_REPO" "$PATH_TO_GIT_CLONE" info "Repository cloned to $PATH_TO_GIT_CLONE" } # Install theme install_theme() { - local src="$HOME/$THEME_NAME" + local src="${1:-$HOME/$THEME_NAME}" local dst="$THEMES_DIR/$THEME_NAME" - [[ ! -d "$src" ]] && { error "Clone repository first"; return 1;} + [[ ! -d "$src" ]] && { error "Source directory not found: $src"; return 1;} - # Backup and copy - [[ -d "$dst" ]] && sudo mv "$dst" "${dst}_$DATE" + # Remove existing install and copy fresh + [[ -d "$dst" ]] && sudo rm -rf "$dst" sudo mkdir -p "$dst" spin "Installing theme files..." sudo cp -r "$src"/* "$dst"/ @@ -140,14 +140,31 @@ install_theme() { [[ -d "$dst/Fonts" ]] && spin "Installing fonts..." sudo cp -r "$dst/Fonts"/* /usr/share/fonts/ # Configure SDDM - echo "[Theme] - Current=$THEME_NAME" | sudo tee /etc/sddm.conf >/dev/null + printf '[Theme]\nCurrent=%s\n' "$THEME_NAME" | sudo tee /etc/sddm.conf >/dev/null sudo mkdir -p /etc/sddm.conf.d - echo "[General] - InputMethod=qtvirtualkeyboard" | sudo tee /etc/sddm.conf.d/virtualkbd.conf >/dev/null + printf '[General]\nInputMethod=qtvirtualkeyboard\n' | sudo tee /etc/sddm.conf.d/virtualkbd.conf >/dev/null info "Theme installed" + info "Available themes:" + for theme in "${THEMES[@]}"; do + echo " - $theme" + done +} + +# Install from local repo (no clone needed) +install_local() { + local script_dir + script_dir="$(dirname "$(realpath "$0")")" + install_theme "$script_dir" + info "Installed from local files: $script_dir" +} + +# Remove the git clone staging folder from $HOME +cleanup_clone() { + [[ ! -d "$PATH_TO_GIT_CLONE" ]] && { warn "No clone found at $PATH_TO_GIT_CLONE"; return; } + rm -rf "$PATH_TO_GIT_CLONE" + info "Removed $PATH_TO_GIT_CLONE" } # Select theme variant @@ -212,9 +229,11 @@ main() { "📦 Install Dependencies" \ "📥 Clone Repository" \ "📂 Install Theme" \ + "🔄 Install Local Theme" \ "🔧 Enable SDDM Service" \ "🎨 Select Theme Variant" \ "✨ Preview the set theme" \ + "🗑️ Clean Up Clone" \ "❌ Exit") case "$choice" in @@ -222,9 +241,11 @@ main() { "📦 Install Dependencies") install_deps ;; "📥 Clone Repository") clone_repo ;; "📂 Install Theme") install_theme ;; + "🔄 Install Local Theme") install_local ;; "🔧 Enable SDDM Service") enable_sddm ;; "🎨 Select Theme Variant") select_theme ;; "✨ Preview the set theme") preview_theme;; + "🗑️ Clean Up Clone") cleanup_clone ;; "❌ Exit") info "Goodbye!"; exit 0 ;; esac