From 65b4b1a050b0fb8e52bb66ae6836bbc1b7706473 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:44:40 +1000 Subject: internal: make wallpaper dir configurable --- services/Wallpapers.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index fc965e5..1470648 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -1,5 +1,6 @@ pragma Singleton +import "root:/config" import "root:/utils/scripts/fuzzysort.js" as Fuzzy import "root:/utils" import Quickshell @@ -9,8 +10,7 @@ import QtQuick Singleton { id: root - readonly property string currentNamePath: `${Paths.state}/wallpaper/path.txt`.slice(7) - readonly property string path: `${Paths.pictures}/Wallpapers`.slice(7) + readonly property string currentNamePath: Paths.strip(`${Paths.state}/wallpaper/path.txt`) readonly property list extensions: ["jpg", "jpeg", "png", "webp", "tif", "tiff"] readonly property list list: wallpapers.instances @@ -93,7 +93,7 @@ Singleton { Process { running: true - command: ["find", root.path, "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] + command: ["find", Config.paths.wallpaperDir, "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] stdout: StdioCollector { onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort() } -- cgit v1.2.3-freya