diff --git a/ThemeLoader.qml b/ThemeLoader.qml index 1debbab..cfc79a7 100644 --- a/ThemeLoader.qml +++ b/ThemeLoader.qml @@ -6,9 +6,15 @@ import Quickshell.Io Singleton { id: root property alias colors: loader + function reload() { + loader.reload(); + } FileView { id: loader + watchChanges: true + onFileChanged: this.reload() + onAdapterUpdated: this.reload() // create color properties, initialize them to black and helper color array property var colors: text().split('\n') diff --git a/modules/ipc/Ipc.qml b/modules/ipc/Ipc.qml new file mode 100644 index 0000000..85e9f6a --- /dev/null +++ b/modules/ipc/Ipc.qml @@ -0,0 +1,10 @@ +import Quickshell +import Quickshell.Io +import qs + +IpcHandler { + target: "colors" +function reload() { + ThemeLoader.reload() +} +} diff --git a/shell.qml b/shell.qml index 4efaf44..639684a 100644 --- a/shell.qml +++ b/shell.qml @@ -1,8 +1,10 @@ import Quickshell import QtQuick import qs.modules.Bar +import qs.modules.ipc ShellRoot { id: root Bar {} + Ipc {} }