From ee326a72ae65ec34059456eeb323882be329d11c Mon Sep 17 00:00:00 2001 From: quadbyte Date: Wed, 13 Aug 2025 16:31:11 -0400 Subject: [PATCH] Basic IPC Manager - Not backward compatible --- Services/Cava.qml | 4 +--- Services/IPCManager.qml | 46 +++++++++++++++++++++++++++++++++++++++++ shell.qml | 2 ++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 Services/IPCManager.qml diff --git a/Services/Cava.qml b/Services/Cava.qml index fb7f221..2e996fa 100644 --- a/Services/Cava.qml +++ b/Services/Cava.qml @@ -5,7 +5,7 @@ import qs.Services Singleton { id: root - + property var values: Array(count).fill(0) property int count: 44 property int noiseReduction: 60 @@ -31,8 +31,6 @@ Singleton { } }) - - Process { id: process property int index: 0 diff --git a/Services/IPCManager.qml b/Services/IPCManager.qml new file mode 100644 index 0000000..f9f8d8f --- /dev/null +++ b/Services/IPCManager.qml @@ -0,0 +1,46 @@ +import QtQuick +import Quickshell.Io + +Item { + id: root + + IpcHandler { + target: "settings" + + function toggle() { + settingsPanel.isLoaded = !settingsPanel.isLoaded + } + } + + IpcHandler { + target: "notifications" + + function toggleHistory() { + notificationHistoryPanel.isLoaded = !notificationHistoryPanel.isLoaded + } + + function toggleDoNotDisturb() {// TODO + } + } + + IpcHandler { + target: "idleInhibitor" + + function toggle() {// TODO + } + } + + IpcHandler { + target: "appLauncher" + + function toggle() {// TODO + } + } + + IpcHandler { + target: "lockScreen" + + function toggle() {// TODO + } + } +} diff --git a/shell.qml b/shell.qml index 631fb13..84d7daf 100644 --- a/shell.qml +++ b/shell.qml @@ -46,6 +46,8 @@ ShellRoot { id: notificationHistoryPanel } + IPCManager {} + Component.onCompleted: { // Ensure our singleton is created as soon as possible so we start fetching weather asap Location.init()