48 lines
951 B
QML
48 lines
951 B
QML
import Quickshell
|
|
import QtQuick
|
|
import Quickshell.Io
|
|
|
|
|
|
ShellRoot {
|
|
id: shell
|
|
|
|
|
|
property bool launcherOpen: true
|
|
|
|
FileView {
|
|
id: config
|
|
path: Config.appConfigPath
|
|
watchChanges: true
|
|
onFileChanged: reload()
|
|
onAdapterUpdated: writeAdapter()
|
|
|
|
JsonAdapter {
|
|
id: adapter
|
|
property var apps
|
|
}
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
console.log("Current config:", Config.appConfigPath, config.adapter.apps)
|
|
}
|
|
IpcHandler {
|
|
target: "launcher"
|
|
|
|
function toggle(): void {
|
|
shell.launcherOpen = !shell.launcherOpen;
|
|
}
|
|
function open(): void {
|
|
shell.launcherOpen = true;
|
|
}
|
|
function close(): void {
|
|
shell.launcherOpen = false;
|
|
}
|
|
}
|
|
|
|
// LauncherWindow {
|
|
// shellOpen: shell.launcherOpen
|
|
// onRequestClose: shell.launcherOpen = false
|
|
// apps: adapter.apps
|
|
// }
|
|
}
|