feat: add multi-session desktop workspace

This commit is contained in:
2026-08-13 21:34:04 +02:00
parent 12b9b83d51
commit 475f95ba70
56 changed files with 8998 additions and 3805 deletions
+23 -7
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import qs.Commons
import qs.Widgets
@@ -16,13 +17,31 @@ Item {
readonly property string screenName: screen?.name ?? ""
readonly property real capsuleHeight: Style.getCapsuleHeightForScreen(screenName)
readonly property string bridgeState: pluginApi?.pluginSettings?.bridgeState ?? "idle"
readonly property string projectLabel: pluginApi?.pluginSettings?.projectLabel ?? "Home"
readonly property string projectLabel: pluginApi?.pluginSettings?.projectLabel ?? "0 sessions"
readonly property int attentionCount: pluginApi?.pluginSettings?.attentionCount ?? 0
readonly property string glyph: bridgeState === "streaming" ? "◒" : bridgeState === "failed" ? "!" : attentionCount > 0 ? "●" : "●"
readonly property color stateColor: bridgeState === "failed" ? Color.mError : attentionCount > 0 ? Color.mPrimary : Color.mOnSurface
readonly property int workingCount: pluginApi?.pluginSettings?.workingCount ?? 0
readonly property int recoveringCount: pluginApi?.pluginSettings?.recoveringCount ?? 0
readonly property int errorCount: pluginApi?.pluginSettings?.errorCount ?? 0
readonly property string glyph: errorCount > 0 ? "!" : bridgeState === "streaming" ? "◒" : recoveringCount > 0 ? "↻" : attentionCount > 0 ? "●" : "●"
readonly property color stateColor: errorCount > 0 ? Color.mError : attentionCount > 0 ? Color.mPrimary : Color.mOnSurface
implicitWidth: content.implicitWidth + Style.marginM * 2
implicitHeight: capsuleHeight
// Keep launch paths configurable for deployments while retaining the local build fallback.
Process {
id: bridgeStartProcess
command: ["systemctl", "--user", "start", "pi-status-bridge.service"]
onExited: function(exitCode) {
if (exitCode === 0)
uiLaunchProcess.running = true
}
}
Process {
id: uiLaunchProcess
command: ["bash", "-c", "ui=\"${PI_STATUS_UI_BINARY:-$HOME/projects/pi-status-bridge/ui/src-tauri/target/release/pi-status-ui}\"; test -x \"$ui\" && exec setsid -f env TMPDIR=/tmp \"$ui\" --toggle >/tmp/pi-status-ui.log 2>&1"]
}
Rectangle {
id: visualCapsule
anchors.centerIn: parent
@@ -46,10 +65,7 @@ Item {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
if (pluginApi)
pluginApi.togglePanel(root.screen, visualCapsule)
}
onClicked: bridgeStartProcess.running = true
}
}
}