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>
This commit is contained in:
commit
99e64a7713
433 files changed
+57792
No files matched your search
@@ -0,0 +1,60 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property int consumers: 0
|
||||
// Desktop visualizer widgets request Cava regardless of the media card's toggle.
|
||||
property int widgetConsumers: 0
|
||||
property var bars: Array(24).fill(0)
|
||||
property string error: ""
|
||||
property int frames: 0
|
||||
property bool failed: false
|
||||
readonly property bool wanted: ConfigService.ready && MediaService.playing && ((ConfigService.data.media.showCava && consumers > 0) || widgetConsumers > 0)
|
||||
onWantedChanged: {
|
||||
if (!wanted) {
|
||||
failed = false;
|
||||
error = "";
|
||||
bars = Array(24).fill(0);
|
||||
}
|
||||
}
|
||||
Process {
|
||||
id: process
|
||||
command: ["python3", Quickshell.shellPath("helpers/cava.py"), Quickshell.shellPath("config/cava.conf")]
|
||||
running: root.wanted && !root.failed
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
const values = data.trim().split(";").filter(v => v.length).map(Number);
|
||||
if (values.length === 24 && values.every(v => Number.isFinite(v) && v >= 0 && v <= 1000)) {
|
||||
root.bars = values.map(v => v / 1000);
|
||||
root.frames++;
|
||||
}
|
||||
}
|
||||
}
|
||||
stderr: StdioCollector {
|
||||
id: errors
|
||||
}
|
||||
// Quickshell 0.3.1 metadata omits QProcess::ExitStatus.
|
||||
// qmllint disable signal-handler-parameters
|
||||
onExited: code => {
|
||||
if (root.wanted) {
|
||||
root.failed = true;
|
||||
root.error = errors.text.trim().slice(0, 300) || "Cava stopped (" + code + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
IpcHandler {
|
||||
target: "cava"
|
||||
function status(): string {
|
||||
return JSON.stringify({
|
||||
running: process.running,
|
||||
error: root.error,
|
||||
bars: root.bars,
|
||||
frames: root.frames,
|
||||
consumers: root.consumers
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user