summaryrefslogtreecommitdiff
path: root/services/Wallpapers.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 16:06:27 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 16:06:27 +1000
commit3d05e7c308fa3b3228916330db7a5105e9be411d (patch)
tree8270c9282aa885e8fc6e89e7af62ac9af7e84925 /services/Wallpapers.qml
parentMerge branch 'main' of https://github.com/caelestia-dots/shell (diff)
downloadcaelestia-shell-3d05e7c308fa3b3228916330db7a5105e9be411d.tar.gz
caelestia-shell-3d05e7c308fa3b3228916330db7a5105e9be411d.tar.bz2
caelestia-shell-3d05e7c308fa3b3228916330db7a5105e9be411d.zip
internal: remove dependency on fd
Diffstat (limited to 'services/Wallpapers.qml')
-rw-r--r--services/Wallpapers.qml5
1 files 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<string> extensions: ["jpg", "jpeg", "png", "webp", "tif", "tiff"]
readonly property list<Wallpaper> 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()
}
}