From e373fe0375a45aa2825e28c7326bed1a3cd97c65 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 17 Jun 2025 22:44:29 +1000 Subject: launcher: fix wallpaper preview colours Also disable transparency action (not impled and won't be in the near future) --- services/Wallpapers.qml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'services/Wallpapers.qml') diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index a667017..fc965e5 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -18,6 +18,7 @@ Singleton { readonly property string current: showPreview ? previewPath : actualCurrent property string previewPath property string actualCurrent + property bool previewColourLock readonly property list preppedWalls: list.map(w => ({ name: Fuzzy.prepare(w.name), @@ -35,8 +36,7 @@ Singleton { function setWallpaper(path: string): void { actualCurrent = path; - setWall.path = path; - setWall.startDetached(); + Quickshell.execDetached(["caelestia", "wallpaper", "-f", path]); } function preview(path: string): void { @@ -47,7 +47,8 @@ Singleton { function stopPreview(): void { showPreview = false; - Colours.endPreviewOnNextChange = true; + if (!previewColourLock) + Colours.showPreview = false; } reloadableId: "wallpapers" @@ -72,7 +73,10 @@ Singleton { path: root.currentNamePath watchChanges: true onFileChanged: reload() - onLoaded: root.actualCurrent = text().trim() + onLoaded: { + root.actualCurrent = text().trim(); + root.previewColourLock = false; + } } Process { @@ -87,14 +91,6 @@ Singleton { } } - Process { - id: setWall - - property string path - - command: ["caelestia", "wallpaper", "-f", path] - } - Process { running: true command: ["find", root.path, "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] -- cgit v1.2.3-freya