summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/Wallpapers.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml
index 4bce290..eea4cb4 100644
--- a/services/Wallpapers.qml
+++ b/services/Wallpapers.qml
@@ -103,11 +103,26 @@ Singleton {
}
}
+ Process {
+ id: watchWallsProc
+
+ running: true
+ command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Config.paths.wallpaperDir]
+ stdout: SplitParser {
+ onRead: data => {
+ if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))
+ getWallsProc.running = true;
+ }
+ }
+ }
+
Connections {
target: Config.paths
function onWallpaperDirChanged(): void {
getWallsProc.running = true;
+ watchWallsProc.running = false;
+ watchWallsProc.running = true;
}
}