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>
64 lines
2.8 KiB
QML
64 lines
2.8 KiB
QML
import QtQuick
|
|
import QtQuick.Shapes
|
|
import Quickshell
|
|
import Quickshell.Wayland
|
|
import "../components"
|
|
import "../core"
|
|
import "../services"
|
|
import "../theme"
|
|
// Quickshell selects the concrete PanelWindow implementation at runtime.
|
|
// qmllint disable uncreatable-type
|
|
PanelWindow {
|
|
// qmllint enable uncreatable-type
|
|
id: root
|
|
required property var modelData
|
|
screen: modelData
|
|
anchors { top: true; left: true; right: true }
|
|
readonly property int outerMargin: BarDrawers.margin
|
|
// The window reaches below the bar (input is masked to the bar) so the
|
|
// HyprGlass layer edge is not on the bar's bottom edge, where drawers join.
|
|
implicitHeight: BarDrawers.bottom + BarDrawers.overhang
|
|
mask: Region { item: panel }
|
|
color: Theme.transparent
|
|
exclusionMode: ExclusionMode.Ignore
|
|
WlrLayershell.namespace: "glassMxrph-bar"
|
|
Component.onCompleted: TrayService.registerBar(root)
|
|
Component.onDestruction: TrayService.unregisterBar(root)
|
|
GlassPanel {
|
|
id: panel
|
|
x: root.outerMargin; y: root.outerMargin
|
|
width: root.width - 2 * root.outerMargin
|
|
height: BarDrawers.height
|
|
radius: BarDrawers.radius
|
|
border.width: 0
|
|
ModuleRow { position: "left"; barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
|
ModuleRow { position: "center"; barScreen: root.screen; anchors.centerIn: parent }
|
|
ModuleRow { position: "right"; barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
|
}
|
|
// Outline with openings where drawers hang from the bar.
|
|
Shape {
|
|
id: outline
|
|
x: panel.x
|
|
y: panel.y
|
|
width: panel.width
|
|
height: panel.height
|
|
preferredRendererType: Shape.CurveRenderer
|
|
readonly property var gaps: BarDrawers.gapsFor(root.screen ? root.screen.name : "").map(g => [g.x0 - panel.x, g.x1 - panel.x]).sort((a, b) => b[0] - a[0])
|
|
ShapePath {
|
|
fillColor: "transparent"
|
|
strokeColor: Theme.border
|
|
strokeWidth: 1
|
|
PathSvg {
|
|
path: {
|
|
const W = panel.width - 1, H = panel.height - 0.5, r = Math.max(0, panel.radius - 0.5), o = 0.5;
|
|
let d = `M ${r + o} ${o} L ${W - r} ${o} A ${r} ${r} 0 0 1 ${W} ${r + o} L ${W} ${H - r} A ${r} ${r} 0 0 1 ${W - r} ${H}`;
|
|
// Bottom edge right to left, skipping each drawer's span.
|
|
for (const g of outline.gaps)
|
|
d += ` L ${Math.min(W - r, Math.max(r, g[1]))} ${H} M ${Math.max(r, Math.min(W - r, g[0]))} ${H}`;
|
|
return d + ` L ${r + o} ${H} A ${r} ${r} 0 0 1 ${o} ${H - r} L ${o} ${r + o} A ${r} ${r} 0 0 1 ${r + o} ${o}`;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|