add ipc to reload colors

This commit is contained in:
lucy 2026-03-08 14:20:18 +01:00
parent 9c39259de4
commit 6fc6f8d300
3 changed files with 18 additions and 0 deletions

View File

@ -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')

10
modules/ipc/Ipc.qml Normal file
View File

@ -0,0 +1,10 @@
import Quickshell
import Quickshell.Io
import qs
IpcHandler {
target: "colors"
function reload() {
ThemeLoader.reload()
}
}

View File

@ -1,8 +1,10 @@
import Quickshell
import QtQuick
import qs.modules.Bar
import qs.modules.ipc
ShellRoot {
id: root
Bar {}
Ipc {}
}