Files
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

36 lines
1.1 KiB
QML

pragma Singleton
import QtQuick
import Quickshell
import "../../../../services" as GS
// glassMxrph stand-in: the audio spectrum comes from glassMxrph's Cava
// (Noctalia's PwAudioSpectrum is not in Quickshell 0.3.1).
Singleton {
id: root
property var _registeredComponents: ({})
readonly property int _registeredCount: Object.keys(_registeredComponents).length
readonly property var values: GS.CavaService.bars
readonly property bool isIdle: !GS.CavaService.wanted
property bool subscribed: false
on_RegisteredCountChanged: {
const want = _registeredCount > 0;
if (want !== subscribed) {
GS.CavaService.widgetConsumers += want ? 1 : -1;
subscribed = want;
}
}
function registerComponent(componentId) {
const next = Object.assign({}, _registeredComponents);
next[componentId] = true;
_registeredComponents = next;
}
function unregisterComponent(componentId) {
const next = Object.assign({}, _registeredComponents);
delete next[componentId];
_registeredComponents = next;
}
function isRegistered(componentId) {
return !!_registeredComponents[componentId];
}
}