From 3d05e7c308fa3b3228916330db7a5105e9be411d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 15 Jun 2025 16:06:27 +1000 Subject: internal: remove dependency on fd --- services/Wallpapers.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index ef0eb3d..a667017 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -11,6 +11,7 @@ Singleton { readonly property string currentNamePath: `${Paths.state}/wallpaper/path.txt`.slice(7) readonly property string path: `${Paths.pictures}/Wallpapers`.slice(7) + readonly property list extensions: ["jpg", "jpeg", "png", "webp", "tif", "tiff"] readonly property list list: wallpapers.instances property bool showPreview: false @@ -96,9 +97,9 @@ Singleton { Process { running: true - command: ["fd", ".", root.path, "-t", "f", "-e", "jpg", "-e", "jpeg", "-e", "png", "-e", "webp", "-e", "tif", "-e", "tiff"] + command: ["find", root.path, "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] stdout: StdioCollector { - onStreamFinished: wallpapers.model = text.trim().split("\n") + onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort() } } -- cgit v1.2.3-freya