42 lines
895 B
QML
42 lines
895 B
QML
import Quickshell
|
|
import QtQuick
|
|
import Quickshell.Io
|
|
|
|
ShellRoot {
|
|
id: shell
|
|
|
|
property bool launcherOpen: true
|
|
property var appConfig: []
|
|
|
|
FileView {
|
|
id: configFile
|
|
path: Config.appConfigPath
|
|
watchChanges: true
|
|
onFileChanged: reload()
|
|
onLoaded: {
|
|
shell.appConfig = JSON.parse(configFile.text());
|
|
console.log("here", configFile.__data);
|
|
}
|
|
}
|
|
|
|
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: shell.appConfig
|
|
}
|
|
}
|