From 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 Mon Sep 17 00:00:00 2001 From: AlexanderCurl Date: Sat, 18 Apr 2026 17:46:06 +0100 Subject: Replaced file structures for themes in the correct format --- .../WallpaperWatcherDaemon.qml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/WallpaperWatcherDaemon/WallpaperWatcherDaemon.qml (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/WallpaperWatcherDaemon/WallpaperWatcherDaemon.qml') diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/WallpaperWatcherDaemon/WallpaperWatcherDaemon.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/WallpaperWatcherDaemon/WallpaperWatcherDaemon.qml new file mode 100644 index 0000000..ffed6c1 --- /dev/null +++ b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/WallpaperWatcherDaemon/WallpaperWatcherDaemon.qml @@ -0,0 +1,66 @@ +import QtQuick +import Quickshell +import Quickshell.Io +import qs.Common +import qs.Services +import qs.Modules.Plugins + +PluginComponent { + id: root + + property string scriptPath: pluginData.scriptPath || "" + property var popoutService: null + + Connections { + target: SessionData + function onWallpaperPathChanged() { + if (scriptPath) { + var scriptProcess = scriptProcessComponent.createObject(root, { + wallpaperPath: SessionData.wallpaperPath + }) + scriptProcess.running = true + } + } + } + + Component { + id: scriptProcessComponent + + Process { + property string wallpaperPath: "" + + command: [scriptPath, wallpaperPath] + + stdout: StdioCollector { + onStreamFinished: { + if (text.trim()) { + console.log("WallpaperWatcherDaemon script output:", text.trim()) + } + } + } + + stderr: StdioCollector { + onStreamFinished: { + if (text.trim()) { + ToastService.showError("Wallpaper Change Script Error", text.trim()) + } + } + } + + onExited: (exitCode) => { + if (exitCode !== 0) { + ToastService.showError("Wallpaper Change Script Error", "Script exited with code: " + exitCode) + } + destroy() + } + } + } + + Component.onCompleted: { + console.info("WallpaperWatcherDaemon: Started monitoring wallpaper changes") + } + + Component.onDestruction: { + console.info("WallpaperWatcherDaemon: Stopped monitoring wallpaper changes") + } +} -- cgit v1.3