From 36adb25231572bf288061cf6e41b69a496399873 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 8 Jun 2026 01:03:00 +1000 Subject: [PATCH] feat: set featured wall as default if no wall set --- services/Wallpapers.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index a56ff348..37b60667 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -13,6 +13,7 @@ Searcher { readonly property string currentNamePath: `${Paths.state}/wallpaper/path.txt` readonly property list smartArg: GlobalConfig.services.smartScheme ? [] : ["--no-smart"] + readonly property string fallback: Quickshell.shellPath("assets/wallpaper.webp") property bool showPreview: false readonly property string current: showPreview ? previewPath : actualCurrent @@ -76,11 +77,22 @@ Searcher { FileView { path: root.currentNamePath watchChanges: true + printErrors: false onFileChanged: reload() onLoaded: { - root.actualCurrent = text().trim(); + let wall = text().trim(); + if (!wall) { + wall = root.fallback; + Quickshell.execDetached(["caelestia", "wallpaper", "-f", root.fallback, ...root.smartArg]); + } + root.actualCurrent = wall; root.previewColourLock = false; } + onLoadFailed: { + root.actualCurrent = root.fallback; + root.previewColourLock = false; + Quickshell.execDetached(["caelestia", "wallpaper", "-f", root.fallback, ...root.smartArg]); + } } FileSystemModel {