3 +import Quickshell.Wayland
4 +import "Util.js" as Util 7 9 required property QtObject theme
15 17 required property
QtObject clipboardService
16 18 required property
QtObject launcherService
17 19 required property
QtObject audioService
20 + required property
QtObject brightnessService
18 21 required property
QtObject networkService
19 22 required property
QtObject bluetoothService
20 23 required property
QtObject powerService
21 - required property
QtObject screenshotsService
22 24 required property
QtObject idleService
23 25 required property
QtObject lockService
24 - required property
QtObject diagnosticsService
25 26 required property
var barWindow
26 27 readonly property var contentSize: surfaces
? surfaces.popoutContentSize(surfaces.popoutName)
: ({
45 46 readonly property var currentRect: cardFrame.currentRect
46 47 readonly property string activeName: surfaces
? surfaces.popoutName
: "" 47 48 readonly property string removingName: surfaces
? surfaces.removingLoaderName
: "" 48 - readonly property bool testHarness:
Quickshell.env(
"NUGULAND_SMOKE")
=== "1" && Quickshell.env(
"NUGULAND_REAL_INPUT")
!== "1" 50 - function parseJson(text, valueWhenInvalid) {
52 - return JSON.
parse(
String(text));
54 - return valueWhenInvalid;
49 + readonly property int surfaceWidth: surfaces
&& surfaces.screenWidth
> 0 ? surfaces.screenWidth
: contentSize.width
50 + readonly property int surfaceHeight: surfaces
&& surfaces.screenHeight
> 0 ? Math.
max(
1, surfaces.screenHeight
- surfaces.barHeight)
: contentSize.height
58 52 function contentComponent(name) {
59 53 switch (
String(name)) {
61 55 return clockContent;
57 + return systemContent;
64 58 case "notifications":
65 59 return notificationsContent;
67 61 return trayContent;
69 - return windowContent;
71 63 return mediaContent;
75 67 return launcherContent;
77 69 return audioContent;
71 + return brightnessContent;
78 72 case "connectivity":
79 73 return connectivityContent;
81 75 return powerContent;
83 - return screenshotsContent;
85 77 return idleContent;
87 - return diagnosticsContent;
89 79 return helpContent;
93 83 visible: surfaces
&& (surfaces.popoutOpen
|| surfaces.popoutClosing)
94 - grabFocus:
!testHarness
95 - width: contentSize.width
96 - height: contentSize.height
97 - implicitWidth: width
98 - implicitHeight: height
84 + screen: root.barWindow
? root.barWindow.screen
: null 85 + implicitWidth: root.surfaceWidth
86 + implicitHeight: root.surfaceHeight
99 87 color:
"transparent" 88 + exclusionMode:
ExclusionMode.Ignore
89 + WlrLayershell.layer:
WlrLayer.Overlay
90 + WlrLayershell.namespace:
"nuguland-popout" 91 + WlrLayershell.keyboardFocus: root.visible
? WlrKeyboardFocus.Exclusive
: WlrKeyboardFocus.None
100 92 onVisibleChanged: {
101 93 if (
!visible
&& root.surfaces
&& root.surfaces.popoutOpen
&& !root.surfaces.popoutClosing)
102 94 root.surfaces.closePopout(
"focus-grab-outside");
112 - window: root.barWindow
113 - rect.x:
Math.
round(root.popupAnchorRect.x)
114 - rect.y:
Math.
round(root.popupAnchorRect.y)
115 - rect.width:
Math.
round(root.popupAnchorRect.width)
116 - rect.height:
Math.
round(root.popupAnchorRect.height)
117 - adjustment:
PopupAdjustment.None
118 - gravity:
Edges.Bottom
112 + context:
Qt.WindowShortcut
115 + root.surfaces.closePopout(
"escape-key");
121 + id: popoutInputRegion
124 + y: root.surfaces
? root.surfaces.barHeight
: 0 125 + width: parent.width
126 + height:
Math.
max(
1, parent.height
- y)
130 + id: outsideDismissLayer
132 + x: popoutInputRegion.x
133 + y: popoutInputRegion.y
134 + width: popoutInputRegion.width
135 + height: popoutInputRegion.height
136 + acceptedButtons:
Qt.LeftButton
| Qt.RightButton
| Qt.MiddleButton
137 + onPressed: (mouse)
=> {
138 + const rootY
= mouse.y
+ outsideDismissLayer.y;
139 + const inside
= mouse.x
>= card.x
&& mouse.x
<= card.x
+ card.width
&& rootY
>= card.y
&& rootY
<= card.y
+ card.height;
140 + if (
!inside
&& root.surfaces) {
141 + mouse.accepted
= true;
142 + root.surfaces.closePopout(
"outside");
128 153 height:
Math.round(root.currentRect.height)
130 155 color: root.theme
? root.theme.ui.backdrop
: "transparent" 132 157 border.color: root.theme
? root.theme.ui.accent
: "transparent" 134 159 opacity: root.cardFrame.opacity
151 176 anchors.margins:
16 155 - width: parent.width
161 - text: root.activeName.length
> 0 ? root.activeName
: "popout" 167 - width: parent.width
169 - color: root.theme
? root.theme.ui.accent
: "transparent" 187 194 Behavior on opacity {
188 195 NumberAnimation {
196 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 180 190 197 easing.type:
Easing.OutCubic
204 211 Behavior on opacity {
205 212 NumberAnimation {
213 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 180 207 214 easing.type:
Easing.OutCubic
219 226 NumberAnimation {
227 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 130 221 228 easing.type:
Easing.InOutCubic
226 233 Behavior on opacity {
227 234 NumberAnimation {
235 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 90 229 236 easing.type:
Easing.InOutCubic
240 - property
var state: root.timeService
? root.parseJson(root.timeService.stateJson(), {
247 + property
var state: root.timeService
? Util.parseJson(root.timeService.stateJson(), {
243 - property
var calendar: root.timeService
? root.parseJson(root.timeService.calendar(
new Date().getUTCFullYear(),
new Date().getUTCMonth()
+ 1,
new Date().getUTCDate()), {
250 + property date
localNow:
new Date()
251 + property
var calendar: root.timeService
? Util.parseJson(root.timeService.calendar(localNow.getFullYear(), localNow.getMonth()
+ 1, localNow.getDate()), {
277 285 color: modelData.selected
&& root.theme
? root.theme.ui.focus
: "transparent" 278 - border.width: modelData.today
? 1 : 0 279 287 border.color: root.theme
? root.theme.ui.accent
: "transparent" 309 - readonly property real
usage: root.resourceService
? root.resourceService.cpuUsage
: 0 310 - readonly property
var proof: root.resourceService
? root.parseJson(root.resourceService.cpuWidgetState(usage), {
319 + readonly property
var state: root.resourceService
? Util.parseJson(root.resourceService.systemWidgetState(), {
313 - "signal":
"normal",
314 - "colorRole":
"ui.accent" 316 - readonly property
var hero: root.resourceService
? root.parseJson(root.resourceService.resourceHeroCard(
"cpu", usage, root.resourceService.cpuHistory), {
318 - "boundedHeroMeter": {
320 - "sparklineSamples": []
336 + readonly property real
cpuUsage: root.resourceService
? root.resourceService.cpuUsage
: 0 337 + readonly property real
memoryUsage: root.resourceService
? root.resourceService.memoryUsage
: 0 338 + readonly property real
swapUsage: root.resourceService
? root.resourceService.swapUsage
: 0 339 + readonly property string
memoryLabel: root.resourceService
? `${root.resourceService.formatBytes(
Math.
max(
0, root.resourceService.memTotal
- root.resourceService.memAvailable))}
/ ${root.resourceService.formatBytes(root.resourceService.memTotal)}
` : "--" 340 + readonly property string
swapLabel: root.resourceService
&& root.resourceService.swapTotal
> 0 ? `${root.resourceService.formatBytes(
Math.
max(
0, root.resourceService.swapTotal
- root.resourceService.swapFree))}
/ ${root.resourceService.formatBytes(root.resourceService.swapTotal)}
` : "off" 341 + readonly property string
diskLabel: root.resourceService
? `R ${root.resourceService.formatRate(root.resourceService.diskReadRate)}
W ${root.resourceService.formatRate(root.resourceService.diskWriteRate)}
` : "R 0 B/s W 0 B/s" 342 + readonly property string
tempLabel: root.resourceService
? root.resourceService.tempLabel
: "n/a" 343 + readonly property color
cpuColor: root.theme
? root.theme.ui.accent
: "#d86dd8" 344 + readonly property color
memoryColor: root.theme
? root.theme.ui.focus
: "#9aabae" 345 + readonly property color
swapColor: root.theme
? root.theme.warning
: "#f0ee69" 346 + readonly property color
diskColor: root.theme
? root.theme.ui.minor
: "#9d9d9d" 347 + readonly property color
tempColor: root.theme
? root.theme.error
: "#ec6376" 324 350 width: parent
? parent.width
: 0 329 - text:
`cpu ${parent.proof.percent
|| 0}
%` 334 - text:
`signal ${parent.proof.signal
|| "normal"}
/ ${parent.proof.colorRole
|| "ui.accent"}
` 338 353 width: parent.width
340 - value: parent.hero.value
|| 0 341 - sparklineSamples: parent.hero.sparklineSamples
|| []
342 - meterColor: root.theme
? root.theme.ui.accent
: "white" 355 + seriesSamples: root.resourceService
? root.resourceService.systemHistorySamples
: []
356 + seriesColors: [parent.cpuColor, parent.memoryColor, parent.swapColor, parent.diskColor, parent.tempColor]
357 + normalizeSeries:
true 343 358 trackColor: root.theme
? root.theme.ui.minor
: "black" 347 362 theme: root.theme
349 - text:
`${parent.hero.sparkline
? parent.hero.sparkline.sampleCount
: 0}
samples` 364 + valueText:
`${
Math.
round(parent.cpuUsage
* 100)}
%` 365 + value: parent.cpuUsage
366 + barColor: parent.cpuColor
372 + valueText:
`${
Math.
round(parent.memoryUsage
* 100)}
% · ${parent.memoryLabel}
` 373 + value: parent.memoryUsage
374 + barColor: parent.memoryColor
380 + valueText: parent.swapLabel
=== "off" ? "off" : `${
Math.
round(parent.swapUsage
* 100)}
% · ${parent.swapLabel}
` 381 + value: parent.swapUsage
382 + barColor: parent.swapColor
386 + objectName:
"systemDiskRow" 387 + width: parent.width
398 + text: systemPanel.diskLabel
399 + width: parent.width
- 100 400 + elide:
Text.ElideRight
406 + objectName:
"systemTempRow" 407 + width: parent.width
418 + text: systemPanel.tempLabel
419 + width: parent.width
- 100 420 + elide:
Text.ElideRight
426 + objectName:
"systemProcessTable" 427 + width: parent.width
431 + width: parent.width
445 + width: parent.width
- 190 465 + model: root.resourceService
? root.resourceService.processes
: []
468 + required property
var modelData
470 + width: parent.width
476 + text:
String(modelData.pid
|| 0)
483 + text:
String(modelData.name
|| "?")
484 + width: parent.width
- 190 485 + elide:
Text.ElideRight
491 + text:
`${
Number(modelData.cpu
|| 0).toFixed(
1)}
%` 498 + text:
`${
Number(modelData.mem
|| 0).toFixed(
1)}
%` 509 + width: parent.width
512 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.18)
: "transparent" 514 + border.color: root.theme
? root.theme.ui.accent
: "transparent" 517 + anchors.centerIn: parent
522 + color: root.theme
? root.theme.content.normal
: "white" 523 + font.family:
"Symbols Nerd Font Mono" 536 + anchors.fill: parent
538 + if (root.resourceService)
539 + root.resourceService.launchBtm();
383 - niriService: root.niriService
384 - width: parent
? parent.width
: 0 617 + id: brightnessContent
621 + brightnessService: root.brightnessService
622 + width: parent
? parent.width
: 0 434 628 id: connectivityContent
436 630 ConnectivityPanel {
437 631 theme: root.theme
632 + resourceService: root.resourceService
438 633 networkService: root.networkService
439 634 bluetoothService: root.bluetoothService
440 635 width: parent
? parent.width
: 0 457 - id: screenshotsContent
461 - screenshotsService: root.screenshotsService
462 - width: parent
? parent.width
: 0 479 - id: diagnosticsContent
483 - diagnosticsService: root.diagnosticsService
484 - lockService: root.lockService
485 - width: parent
? parent.width
: 0 498 671 theme: root.theme
500 - text:
"bar-owned host" 505 - text:
"widgets register geometry; PopoutHost owns placement, loader lifetime, and service-backed content." 672 + text:
"no popout content." 506 673 width: parent.width
507 674 wrapMode:
Text.WordWrap
682 + item: popoutInputRegion
514 685 component
NuguText:
Text {
515 686 required property QtObject theme
516 687 property string
variant:
"body" 523 694 elide:
Text.ElideRight
530 - Behavior on width {
697 + Behavior on implicitWidth {
531 698 NumberAnimation {
699 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 180 533 700 easing.type:
Easing.OutCubic
538 - Behavior on height {
705 + Behavior on implicitHeight {
539 706 NumberAnimation {
707 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 180 541 708 easing.type:
Easing.OutCubic
546 713 component
ResourceMeter:
Canvas {
549 - property real
value:
0 550 - property
var sparklineSamples: []
551 - property color
meterColor:
"#ffffff" 716 + property
var seriesSamples: []
717 + property
var seriesColors: []
718 + property bool
normalizeSeries:
false 552 719 property color
trackColor:
"#000000" 553 - property real
fillOpacity:
0.22 554 - readonly property bool
boundedHeroMeter:
true 720 + property real
graphBlend:
1 721 + property
var previousSeriesSamples: []
722 + property
var currentSeriesSamples: []
556 724 function clamp01(n) {
557 725 return Math.
max(
0,
Math.
min(
1,
Number(n)));
560 - onValueChanged: requestPaint()
561 - onSparklineSamplesChanged: requestPaint()
562 - onMeterColorChanged: requestPaint()
728 + function sampleValue(sample, index) {
729 + if (
Array.
isArray(sample))
730 + return clamp01(sample[index]
|| 0);
732 + return index
=== 0 ? clamp01(sample)
: 0;
735 + function normalizedSampleValue(sample, index) {
736 + const value
= sampleValue(sample, index);
737 + if (
!normalizeSeries)
740 + const samples
= seriesSamples
|| [];
743 + for (
let i
= 0; i
< samples.length; i
++) {
744 + const candidate
= sampleValue(samples[i], index);
745 + low
= Math.
min(low, candidate);
746 + high
= Math.
max(high, candidate);
748 + const span
= high
- low;
749 + return span
< 0.0001 ? 0.5 : (value
- low)
/ span;
752 + function interpolatedSampleValue(samples, sampleIndex, series) {
753 + const current
= normalizedSampleValue(samples[sampleIndex], series);
754 + if (graphBlend
>= 1 || previousSeriesSamples.length
=== 0)
757 + const previousIndex
= Math.
max(
0, previousSeriesSamples.length
- samples.length
+ sampleIndex);
758 + const previous
= normalizedSampleValue(previousSeriesSamples[previousIndex]
|| samples[sampleIndex], series);
759 + return previous
+ (current
- previous)
* graphBlend;
762 + onGraphBlendChanged: requestPaint()
763 + onSeriesSamplesChanged: {
764 + previousSeriesSamples
= currentSeriesSamples.length
> 0 ? currentSeriesSamples
: seriesSamples;
765 + currentSeriesSamples
= seriesSamples;
767 + graphAnimation.restart();
770 + onSeriesColorsChanged: requestPaint()
771 + onNormalizeSeriesChanged: requestPaint()
563 772 onTrackColorChanged: requestPaint()
564 773 onWidthChanged: requestPaint()
565 774 onHeightChanged: requestPaint()
572 781 ctx.fillStyle
= trackColor;
573 - ctx.globalAlpha
= 0.35;
574 - ctx.fillRect(
0, height
- 4, width,
4);
782 + ctx.globalAlpha
= 0.18;
783 + const seriesCount
= Math.
max(
1, seriesColors.length
|| 1);
784 + for (let row
= 1; row
< seriesCount; row
++) ctx.fillRect(
0,
Math.
round(row
* height
/ seriesCount), width,
1)
575 785 ctx.globalAlpha
= 1;
576 - const bounded
= clamp01(value);
577 - ctx.fillStyle
= meterColor;
578 - ctx.fillRect(
0, height
- 4, width
* bounded,
4);
579 - const samples
= sparklineSamples
|| [];
786 + const samples
= seriesSamples
|| [];
580 787 if (samples.length
< 2)
583 - const dx
= width
/ (samples.length
- 1);
585 - for (let i
= 0; i
< samples.length; i
++) {
587 - const y
= Math.
round((height
- 8)
- clamp01(samples[i])
* (height
- 14));
790 + const dx
= width
/ Math.
max(samples.length
- 1,
1);
791 + for (let series
= 0; series
< seriesCount; series
++) {
792 + const laneTop
= 4 + series
* ((height
- 8)
/ seriesCount);
793 + const laneSpan
= (height
- 12)
/ seriesCount;
796 + let previousY
= Math.
round(laneTop
+ laneSpan
- interpolatedSampleValue(samples,
0, series)
* laneSpan);
797 + ctx.moveTo(previousX, previousY);
798 + for (
let i
= 1; i
< samples.length; i
++) {
800 + const y
= Math.
round(laneTop
+ laneSpan
- interpolatedSampleValue(samples, i, series)
* laneSpan);
801 + const midX
= (previousX
+ x)
* 0.5;
802 + const midY
= (previousY
+ y)
* 0.5;
803 + ctx.quadraticCurveTo(previousX, previousY, midX, midY);
807 + ctx.lineTo(previousX, previousY);
808 + ctx.strokeStyle
= String(seriesColors[series]
|| "#ffffff");
809 + ctx.lineWidth
= series
=== 0 ? 2.4 : 1.8;
593 - ctx.strokeStyle
= meterColor;
596 - ctx.lineTo(width, height
- 4);
597 - ctx.lineTo(
0, height
- 4);
599 - ctx.globalAlpha
= fillOpacity;
600 - ctx.fillStyle
= meterColor;
602 - ctx.globalAlpha
= 1;
814 + NumberAnimation on graphBlend {
821 + easing.type:
Easing.OutCubic
826 + component
SystemMetric:
Column {
829 + required property QtObject theme
830 + property string
label:
"" 831 + property string
valueText:
"" 832 + property real
value:
0 833 + property color
barColor: theme
? theme.ui.accent
: "white" 835 + width: parent
? parent.width
: 0 839 + width: parent.width
843 + theme: metric.theme
849 + theme: metric.theme
850 + text: metric.valueText
856 + width: parent.width
859 + color: metric.theme
? metric.theme.ui.minor
: "black" 862 + width: parent.width
* Math.
max(
0,
Math.
min(
1, metric.value))
863 + height: parent.height
864 + radius: parent.radius
865 + color: metric.barColor
867 + Behavior on width {
869 + duration: metric.theme
&& metric.theme.lowPowerMode
? 0 : 180 870 + easing.type:
Easing.OutCubic
606 881 component
LauncherPanel:
Column {
609 884 required property
QtObject theme
610 885 required property
QtObject launcherService
611 886 property string query:
"" 612 - property
var state: launcherService
? parseJson(launcherService.search(query), {
887 + property
var state: launcherService
? Util.parseJson(launcherService.search(query), {
614 889 "selectedIndex":
-1,
615 890 "launcherPanelContract": {
637 912 readonly property var panel: state.launcherPanelContract
|| ({
639 - readonly property string source:
"Nuguland launcher Content.qml AppList.qml ActionItem.qml plus Nuguland SearchResults.qml ResultPreview plus Nuguland LaunchContent.qml" 640 - readonly property bool fullLauncherSurface:
true 641 - readonly property bool searchFieldDockedBottom:
true 642 - readonly property bool singleResultList:
true 643 - readonly property bool sidePreviewPanel:
true 644 - readonly property bool keyboardNavigation:
true 645 - readonly property bool providerChips:
true 646 - readonly property bool serviceFedOnly:
true 648 - function parseJson(text, valueWhenInvalid) {
650 - return JSON.
parse(
String(text));
652 - return valueWhenInvalid;
656 916 function refresh() {
657 917 if (launcherService)
658 - state
= parseJson(launcherService.search(query), state);
918 + state
= Util.parseJson(launcherService.search(query), state);
669 929 const next
= Object.
assign({
671 931 next.selectedIndex
= i;
672 - next.scrollableListChrome
= launcherService
? parseJson(launcherService.scrollableListChrome(results.length, i), next.scrollableListChrome
|| {
932 + next.scrollableListChrome
= launcherService
? Util.parseJson(launcherService.scrollableListChrome(results.length, i), next.scrollableListChrome
|| {
673 933 })
: next.scrollableListChrome;
674 - next.launcherPreviewPanel
= launcherService
? parseJson(launcherService.launcherPreviewPanel(results[i]), next.launcherPreviewPanel
|| {
934 + next.launcherPreviewPanel
= launcherService
? Util.parseJson(launcherService.launcherPreviewPanel(results[i]), next.launcherPreviewPanel
|| {
675 935 })
: next.launcherPreviewPanel;
725 - text:
"Search apps, windows, actions, clipboard, and calculations" 727 - wrapMode:
Text.WordWrap
731 983 width: parent.width
755 1007 color: root.theme
? root.theme.withAlpha(root.state.providerIntent
=== chip.modelData
? root.theme.ui.focus
: root.theme.ui.minor, root.state.providerIntent
=== chip.modelData
? 0.18 : 0.08)
: "transparent" 757 1009 border.color: root.theme
? (root.state.providerIntent
=== chip.modelData
? root.theme.ui.focus
: root.theme.ui.minor)
: "transparent" 787 1039 color: root.theme
? root.theme.withAlpha(index
=== root.state.selectedIndex
? root.theme.ui.focus
: root.providerColor(row.modelData.provider), index
=== root.state.selectedIndex
? 0.18 : 0.08)
: "transparent" 789 1041 border.color: index
=== root.state.selectedIndex
&& root.theme
? root.theme.ui.focus
: root.providerColor(row.modelData.provider)
798 1050 color: root.theme
? root.theme.withAlpha(root.providerColor(row.modelData.provider),
0.18)
: "transparent" 800 1052 border.color: root.providerColor(row.modelData.provider)
858 1110 color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.9)
: "transparent" 860 1112 border.color: root.theme
? root.theme.ui.accent
: "transparent" 871 1123 color: root.theme
? root.theme.withAlpha(root.providerColor(root.preview.provider
|| root.selected.provider),
0.2)
: "transparent" 873 1125 border.color: root.providerColor(root.preview.provider
|| root.selected.provider)
914 1166 color: root.theme
? root.theme.withAlpha(modelData.primaryAction
? root.theme.ui.focus
: root.theme.ui.minor, modelData.primaryAction
? 0.16 : 0.08)
: "transparent" 916 1168 border.color: root.theme
? (modelData.primaryAction
? root.theme.ui.focus
: root.theme.ui.minor)
: "transparent" 945 1197 color: root.theme
? root.theme.withAlpha(root.theme.ui.focus,
0.14)
: "transparent" 947 1199 border.color: root.theme
? root.theme.ui.focus
: "transparent" 994 1246 elide:
Text.ElideRight
998 - anchors.fill: parent
1000 - acceptedButtons:
Qt.NoButton
1001 - onWheel: (wheel)
=> {
1002 - wheel.accepted
= true;
1003 - root.wheelSelect(wheel.angleDelta.y);
1009 1251 component
NotificationGroup:
Column {
1012 1254 required property
QtObject theme
1013 1255 required property
QtObject notificationService
1014 - property var state: notificationService
? parseJson(notificationService.stateJson(), {
1256 + property var state: notificationService
? Util.parseJson(notificationService.stateJson(), {
1016 1258 "notificationPanelContract": {
1023 1265 readonly property var groups: state.groups
|| []
1024 1266 readonly property
var panel: state.notificationPanelContract
|| ({
1026 - readonly property string source:
"Nuguland NotifGroup.qml NotifGroupList.qml NotifActionList.qml" 1027 - readonly property bool groupedCardPanel:
true 1028 - readonly property bool appMediaSlot:
true 1029 - readonly property bool expandPill:
true 1030 - readonly property bool maskedHorizontalActionRail:
true 1031 - readonly property bool animatedExpandHeight:
true 1033 - function parseJson(text, valueWhenInvalid) {
1035 - return JSON.
parse(
String(text));
1037 - return valueWhenInvalid;
1041 1270 function roleColor(role) {
1054 1283 function runAction(notificationId, actionId) {
1055 1284 if (notificationService)
1056 - state
= parseJson(notificationService.runAction(notificationId, actionId), state);
1285 + state
= Util.parseJson(notificationService.runAction(notificationId, actionId), state);
1060 1289 function toggleGroup(appName) {
1061 1290 if (notificationService)
1062 - state
= parseJson(notificationService.toggleGroup(appName), state);
1291 + state
= Util.parseJson(notificationService.toggleGroup(appName), state);
1066 1295 function dragNotification(notificationId, deltaX, rowWidth) {
1067 1296 if (notificationService)
1068 - state
= parseJson(notificationService.dragNotification(notificationId, deltaX, rowWidth), state);
1297 + state
= Util.parseJson(notificationService.dragNotification(notificationId, deltaX, rowWidth), state);
1079 1308 width: parent
? parent.width
: 0 1084 - text:
"Grouped notifications with direct actions" 1086 - wrapMode:
Text.WordWrap
1090 1311 model: root.groups
1100 1321 implicitHeight: groupColumn.implicitHeight
+ 16 1102 1323 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.12)
: "transparent" 1104 1325 border.color: root.roleColor(modelData.urgency)
1163 1384 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.22)
: "transparent" 1165 1386 border.color: root.theme
? root.theme.ui.accent
: "transparent" 1198 1419 color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.82)
: "transparent" 1200 1421 border.color: root.theme
? root.theme.ui.minor
: "transparent" 1277 1498 width:
Math.max(
58, actionText.implicitWidth
+ 18)
1279 1500 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.16)
: "transparent" 1281 1502 border.color: root.theme
? root.theme.ui.accent
: "transparent" 1363 1584 Behavior on implicitHeight {
1364 1585 NumberAnimation {
1586 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 180 1366 1587 easing.type:
Easing.OutCubic
1419 1640 target: translation
1421 1642 to: shakeRoot.shakeOffsets[
1]
1643 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 50 1423 1644 easing.type:
Easing.OutCubic
1427 1648 target: translation
1429 1650 to: shakeRoot.shakeOffsets[
2]
1651 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 50 1431 1652 easing.type:
Easing.OutCubic
1435 1656 target: translation
1437 1658 to: shakeRoot.shakeOffsets[
3]
1659 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 40 1439 1660 easing.type:
Easing.OutCubic
1443 1664 target: translation
1445 1666 to: shakeRoot.shakeOffsets[
4]
1667 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 40 1447 1668 easing.type:
Easing.OutCubic
1451 1672 target: translation
1453 1674 to: shakeRoot.shakeOffsets[
5]
1675 + duration: root.theme
&& root.theme.lowPowerMode
? 0 : 30 1455 1676 easing.type:
Easing.OutCubic
1471 1692 required property
QtObject theme
1472 1693 required property
QtObject idleService
1473 - property var state: idleService
? parseJson(idleService.stateJson(), {
1694 + property var state: idleService
? Util.parseJson(idleService.stateJson(), {
1474 1695 "active":
false,
1476 1697 "remainingSeconds":
0,
1486 1707 readonly property var panel: state.idlePanelContract
|| ({
1488 - readonly property string source:
"Nuguland IdleInhibit.qml plus Nuguland Privacy.qml" 1489 - readonly property bool serviceFedOnly:
true 1491 - function parseJson(text, valueWhenInvalid) {
1493 - return JSON.
parse(
String(text));
1495 - return valueWhenInvalid;
1500 1712 width: parent
? parent.width
: 0 1514 1726 elide:
Text.ElideRight
1520 - text:
"Keep-awake controls" 1521 - width: parent.width
1522 - wrapMode:
Text.WordWrap
1526 1730 width: parent.width
1538 1742 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.12)
: "transparent" 1540 1744 border.color: root.theme
? root.theme.ui.accent
: "transparent" 1550 1754 anchors.fill: parent
1552 1756 if (root.idleService)
1553 - root.state
= root.parseJson(root.idleService.toggle(parent.modelData,
"manual"), root.state);
1757 + root.state
= Util.parseJson(root.idleService.toggle(parent.modelData,
"manual"), root.state);
1566 - component
DiagnosticsPanel:
Column {
1569 - required property QtObject theme
1570 - required property QtObject diagnosticsService
1571 - required property QtObject lockService
1572 - property
var state: diagnosticsService
? parseJson(diagnosticsService.stateJson(), {
1573 - "serviceHealth": {
1575 - "referenceRuntimeContracts": {
1577 - "diagnosticsPanelContract": {
1581 - "processPolicy": {
1588 - "serviceHealth": {
1590 - "referenceRuntimeContracts": {
1592 - "diagnosticsPanelContract": {
1596 - "processPolicy": {
1603 - property
var lockState: lockService
? parseJson(lockService.stateJson(), {
1606 - readonly property
var panel: state.diagnosticsPanelContract
|| ({
1608 - readonly property
var services: serviceRows(state.serviceHealth
|| ({
1610 - readonly property
var contracts: contractRows(state.referenceRuntimeContracts
|| ({
1612 - readonly property
var anchorsModel: anchorRows(state.anchors
|| ({
1614 - readonly property string
source:
"Nuguland ContentPage.qml plus Nuguland NavigationRail.qml plus Nuguland SlideView.qml" 1615 - readonly property bool
nativeHealthConsole:
true 1616 - readonly property bool
serviceStatusGrid:
true 1617 - readonly property bool
referenceContractRail:
true 1618 - readonly property bool
cleanupProcessCard:
true 1619 - readonly property bool
surfaceAnchorMap:
true 1620 - readonly property bool
failureShakeSlot:
true 1622 - function parseJson(text, valueWhenInvalid) {
1624 - return JSON.
parse(
String(text));
1626 - return valueWhenInvalid;
1630 - function serviceRows(health) {
1631 - const names
= Object.
keys(health).sort();
1632 - return names.map((name)
=> {
1633 - const item
= health[name]
|| {
1637 - "component": item.component
|| name,
1638 - "ready":
!!item.ready
|| !!item.available
|| !!item.eventStreamReady,
1639 - "status": item.available
=== false ? "offline" : (item.ready
=== false ? "missing" : "ready")
1644 - function contractRows(contracts) {
1645 - const names
= Object.
keys(contracts).sort();
1646 - return names.map((name)
=> {
1649 - "source": contracts[name]
? contracts[name].source
|| "runtime" : "runtime" 1654 - function anchorRows(anchors) {
1655 - const names
= Object.
keys(anchors).sort();
1656 - return names.map((name)
=> {
1657 - const rect
= anchors[name]
|| {
1661 - "rect":
`${
Math.
round(rect.x
|| 0)}
,${
Math.
round(rect.y
|| 0)}
${
Math.
round(rect.width
|| 0)}
×${
Math.
round(rect.height
|| 0)}
` 1666 - function cardColor(ok) {
1668 - return "transparent";
1670 - return theme.withAlpha(ok
? theme.ui.accent
: theme.warning, ok
? 0.12 : 0.18);
1673 - function cardBorder(ok) {
1675 - return "transparent";
1677 - return ok
? theme.ui.accent
: theme.warning;
1681 - width: parent
? parent.width
: 0 1686 - text:
"Nuguland health" 1688 - wrapMode:
Text.WordWrap
1692 - objectName:
"serviceStatusGrid" 1693 - width: parent.width
1699 - model: root.services.slice(
0,
18)
1701 - delegate: Rectangle {
1704 - required property
var modelData
1706 - width:
Math.
floor((root.width
- 12)
/ 3)
1709 - color: root.cardColor(serviceCell.modelData.ready)
1711 - border.color: root.cardBorder(serviceCell.modelData.ready)
1714 - anchors.left: parent.left
1715 - anchors.leftMargin:
7 1716 - anchors.right: parent.right
1717 - anchors.rightMargin:
7 1718 - anchors.top: parent.top
1719 - anchors.topMargin:
5 1722 - selected: serviceCell.modelData.ready
1723 - text: serviceCell.modelData.name
1724 - elide:
Text.ElideRight
1728 - anchors.left: parent.left
1729 - anchors.leftMargin:
7 1730 - anchors.right: parent.right
1731 - anchors.rightMargin:
7 1732 - anchors.bottom: parent.bottom
1733 - anchors.bottomMargin:
4 1736 - text: serviceCell.modelData.status
1738 - elide:
Text.ElideRight
1748 - width: parent.width
1752 - objectName:
"cleanupProcessCard" 1753 - width:
Math.
floor((root.width
- 8)
* 0.48)
1756 - color: root.theme
? root.theme.withAlpha(root.theme.ui.focus,
0.14)
: "transparent" 1758 - border.color: root.theme
? root.theme.ui.focus
: "transparent" 1761 - anchors.fill: parent
1762 - anchors.margins:
8 1769 - width: parent.width
1770 - elide:
Text.ElideRight
1776 - text: root.state.cleanup
&& root.state.cleanup.zeroLeftoversRequired
? "zero leftovers required" : "cleanup contract missing" 1777 - width: parent.width
1778 - elide:
Text.ElideRight
1784 - text: root.state.processPolicy
? `widgets: ${root.state.processPolicy.widgetProcesses}
` : "widgets: forbidden" 1785 - width: parent.width
1786 - elide:
Text.ElideRight
1794 - objectName:
"surfaceAnchorMap" 1795 - width: root.width
- parent.children[
0].width
- 8 1798 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.12)
: "transparent" 1800 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 1803 - anchors.fill: parent
1804 - anchors.margins:
8 1811 - width: parent.width
1812 - elide:
Text.ElideRight
1818 - text:
`${root.anchorsModel.length}
anchors · ${root.state.surfaceState
? root.state.surfaceState.phase
|| "closed" : "closed"}
` 1819 - width: parent.width
1820 - elide:
Text.ElideRight
1826 - text: root.state.surfaceState
&& root.state.surfaceState.name
? root.state.surfaceState.name
: "bar-owned popouts" 1827 - width: parent.width
1828 - elide:
Text.ElideRight
1838 - objectName:
"referenceContractRail" 1839 - width: parent.width
1843 - model: root.contracts.slice(
0,
6)
1845 - delegate: Rectangle {
1848 - required property
var modelData
1853 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.08)
: "transparent" 1855 - border.color: root.theme
? root.theme.ui.minor
: "transparent" 1858 - anchors.left: parent.left
1859 - anchors.leftMargin:
8 1860 - anchors.verticalCenter: parent.verticalCenter
1864 - text: contractRow.modelData.name
1866 - elide:
Text.ElideRight
1870 - anchors.left: parent.left
1871 - anchors.leftMargin:
142 1872 - anchors.right: parent.right
1873 - anchors.rightMargin:
8 1874 - anchors.verticalCenter: parent.verticalCenter
1877 - text: contractRow.modelData.source
1878 - elide:
Text.ElideRight
1888 - objectName:
"failureShakeSlot" 1889 - active: root.lockState.failure
&& root.lockState.failure.length
> 0 1890 - width: parent.width
1896 - color: root.theme
? root.theme.withAlpha(root.lockState.failure
? root.theme.error
: root.theme.ui.minor, root.lockState.failure
? 0.18 : 0.08)
: "transparent" 1898 - border.color: root.theme
? (root.lockState.failure
? root.theme.error
: root.theme.ui.minor)
: "transparent" 1901 - anchors.left: parent.left
1902 - anchors.right: parent.right
1903 - anchors.leftMargin:
8 1904 - anchors.rightMargin:
8 1905 - anchors.verticalCenter: parent.verticalCenter
1908 - text: root.lockState.failure
|| "failure feedback armed" 1909 - elide:
Text.ElideRight
1918 1770 component
ClipboardPanel:
Column {
1921 1773 required property QtObject theme
1922 1774 required property QtObject clipboardService
1923 1775 property string
query:
"" 1924 - property
var state: clipboardService
? parseJson(clipboardService.stateJson(), {
1776 + property
var state: clipboardService
? Util.parseJson(clipboardService.stateJson(), {
1926 1778 "clipboardPanelContract": {
1937 1789 readonly property var rows: state.rows
|| []
1938 1790 readonly property
var panel: state.clipboardPanelContract
|| ({
1940 - readonly property string source:
"Nuguland ClipWrapper.qml plus Nuguland Cliphist.qml ScrollEdgeFade.qml" 1941 - readonly property bool clipboardHistoryPanel:
true 1942 - readonly property bool privateModeChip:
true 1943 - readonly property bool searchField:
true 1944 - readonly property bool pinnedFirstRows:
true 1945 - readonly property bool maskedActionRail:
true 1946 - readonly property bool launcherRowParity:
true 1948 - function parseJson(text, valueWhenInvalid) {
1950 - return JSON.
parse(
String(text));
1952 - return valueWhenInvalid;
1956 1794 function refreshFrom(text) {
1957 - state
= parseJson(text, state);
1795 + state
= Util.parseJson(text, state);
1960 1798 function search(text) {
1998 1836 width: parent
? parent.width
: 0 2003 - text:
"Clipboard history" 2005 - wrapMode:
Text.WordWrap
2009 1839 width: parent.width
2017 1847 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.14)
: "transparent" 2019 1849 border.color: root.theme
? root.theme.ui.accent
: "transparent" 2055 1885 color: root.theme
? root.theme.withAlpha(root.state.privateMode
? root.theme.warning
: root.theme.ui.accent,
0.2)
: "transparent" 2057 1887 border.color: root.theme
? (root.state.privateMode
? root.theme.warning
: root.theme.ui.accent)
: "transparent" 2082 1912 color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.7)
: "transparent" 2084 1914 border.color: root.theme
? root.theme.ui.accent
: "transparent" 2112 1942 color: root.theme
? root.theme.withAlpha(modelData.pinned
? root.theme.ui.focus
: root.theme.ui.minor, modelData.pinned
? 0.24 : 0.1)
: "transparent" 2114 1944 border.color: root.theme
? (modelData.pinned
? root.theme.ui.focus
: root.theme.ui.accent)
: "transparent" 2160 1990 color: root.theme
? root.theme.withAlpha(actionButton.modelData
=== "delete" ? root.theme.error
: root.theme.ui.accent,
0.16)
: "transparent" 2162 1992 border.color: root.theme
? (actionButton.modelData
=== "delete" ? root.theme.error
: root.theme.ui.accent)
: "transparent" 2249 - text:
`rows=${root.rows.length}
pinned=${root.state.pinnedCount
|| 0}
scrollEdgeFade=${root.state.scrollableListChrome
? root.state.scrollableListChrome.scrollEdgeFade
: false}
` 2250 - width: parent.width
2251 - elide:
Text.ElideRight
2078 + component
BrightnessPanel:
Column {
2081 + required property QtObject theme
2082 + required property QtObject brightnessService
2083 + property
var state: brightnessService
? Util.parseJson(brightnessService.stateJson(), {
2103 + width:
Math.
max(
1, root.width
- 28)
2106 + color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.88)
: "#242424" 2108 + border.color: root.theme
? root.theme.ui.accent
: "white" 2111 + anchors.left: parent.left
2112 + anchors.top: parent.top
2113 + anchors.bottom: parent.bottom
2114 + width: parent.width
* Math.
max(
0,
Math.
min(
1,
Number(root.state.level
|| 0)))
2115 + radius: parent.radius
2116 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.55)
: "white" 2120 + anchors.centerIn: parent
2121 + text:
`${
Math.
round(
Number(root.state.level
|| 0)
* 100)}
%` 2122 + color: root.theme
? root.theme.content.normal
: "white" 2123 + font.family:
"IBM Plex Mono" 2124 + font.pixelSize:
14 2133 + model: [
0.25,
0.5,
0.75,
1]
2135 + delegate: Rectangle {
2139 + color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.18)
: "#333333" 2141 + border.color: root.theme
? root.theme.ui.focus
: "white" 2144 + anchors.centerIn: parent
2145 + text:
`${
Math.
round(modelData
* 100)}
%` 2146 + color: root.theme
? root.theme.content.normal
: "white" 2147 + font.family:
"IBM Plex Sans" 2148 + font.pixelSize:
13 2152 + anchors.fill: parent
2153 + onClicked: root.brightnessService.setLevel(modelData)
2259 2167 required property
QtObject theme
2168 + required property
QtObject resourceService
2260 2169 required property
QtObject networkService
2261 2170 required property
QtObject bluetoothService
2262 - property var networkState: networkService
? parseJson(networkService.stateJson(), {
2171 + property var networkState: networkService
? Util.parseJson(networkService.stateJson(), {
2263 2172 "knownNetworks": [],
2264 2173 "connectivityPanelContract": {
2275 - property var bluetoothState: bluetoothService
? parseJson(bluetoothService.stateJson(), {
2184 + property var bluetoothState: bluetoothService
? Util.parseJson(bluetoothService.stateJson(), {
2284 2193 readonly property var panel: networkState.connectivityPanelContract
|| ({
2286 - readonly property string source:
"Nuguland bar popouts Network.qml plus Nuguland connections Network.qml Bluetooth.qml" 2287 - readonly property bool combinedConnectivityPanel:
true 2288 - readonly property bool wifiToggleScanList:
true 2289 - readonly property bool bluetoothToggleScanList:
true 2290 - readonly property bool sortedNetworkRows:
true 2291 - readonly property bool sortedDeviceRows:
true 2292 - readonly property bool batteryBadges:
true 2293 - readonly property bool serviceActionsOnly:
true 2295 - function parseJson(text, valueWhenInvalid) {
2297 - return JSON.
parse(
String(text));
2299 - return valueWhenInvalid;
2303 2197 function refreshNetwork(text) {
2304 - networkState
= parseJson(text, networkState);
2198 + networkState
= Util.parseJson(text, networkState);
2307 2201 function refreshBluetooth(text) {
2308 - bluetoothState
= parseJson(text, bluetoothState);
2202 + bluetoothState
= Util.parseJson(text, bluetoothState);
2311 2205 function toggleWifi() {
2370 2264 width: parent
? parent.width
: 0 2375 - text:
"Network and Bluetooth" 2377 - wrapMode:
Text.WordWrap
2267 + objectName:
"networkRateRow" 2268 + width: parent.width
2273 + text: root.resourceService
? `↓ ${root.resourceService.formatRate(root.resourceService.networkRxRate)}
` : "↓ 0 B/s" 2274 + color: root.theme
? root.theme.ui.accent
: "white" 2279 + text: root.resourceService
? `↑ ${root.resourceService.formatRate(root.resourceService.networkTxRate)}
` : "↑ 0 B/s" 2280 + color: root.theme
? root.theme.ui.focus
: "white" 2400 2305 color: root.theme
? root.theme.withAlpha(root.networkState.wifi
&& root.networkState.wifi.enabled
? root.theme.ui.focus
: root.theme.ui.minor,
0.22)
: "transparent" 2402 2307 border.color: root.roleColor(root.networkState.compact
? root.networkState.compact.role
: "ui.minor")
2422 2327 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent, root.networkState.scanning
? 0.32 : 0.16)
: "transparent" 2424 2329 border.color: root.theme
? root.theme.ui.accent
: "transparent" 2454 2359 color: root.theme
? root.theme.withAlpha(active
? root.theme.ui.focus
: root.theme.ui.minor, active
? 0.24 : 0.1)
: "transparent" 2456 2361 border.color: root.roleColor(active
? "ui.accent" : modelData.state
=== "connecting" ? "warning" : "ui.minor")
2520 2425 color: root.theme
? root.theme.withAlpha(root.bluetoothState.adapter
&& root.bluetoothState.adapter.state
=== "powered" ? root.theme.ui.focus
: root.theme.ui.minor,
0.22)
: "transparent" 2522 2427 border.color: root.roleColor(root.bluetoothState.compact
? root.bluetoothState.compact.role
: "ui.minor")
2542 2447 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent, root.bluetoothState.adapter
&& root.bluetoothState.adapter.discovering
? 0.32 : 0.16)
: "transparent" 2544 2449 border.color: root.theme
? root.theme.ui.accent
: "transparent" 2573 2478 color: root.theme
? root.theme.withAlpha(modelData.connected
? root.theme.ui.focus
: root.theme.ui.minor, modelData.connected
? 0.24 : 0.1)
: "transparent" 2575 2480 border.color: root.roleColor(modelData.blocked
? "error" : modelData.connected
? "ui.accent" : "ui.minor")
2621 2526 required property
QtObject theme
2622 2527 required property
QtObject trayService
2623 - property var state: trayService
? parseJson(trayService.stateJson(), {
2625 - "trayPanelContract": {
2528 + property var state: trayService
? Util.parseJson(trayService.stateJson(), {
2629 - "trayPanelContract": {
2632 - readonly property
var rows: state.rows
|| []
2633 - readonly property
var panel: state.trayPanelContract
|| ({
2635 - readonly property string source:
"Nuguland TrayItem.qml plus Nuguland SysTray.qml MenuView.qml plus Nuguland TrayOverflowMenu.qml" 2636 - readonly property bool nativeTrayMenuPanel:
true 2637 - readonly property bool trayItemGrid:
true 2638 - readonly property bool dbusMenuRows:
true 2639 - readonly property bool submenuCollapsePolicy:
true 2640 - readonly property bool menuClosePropagation:
true 2641 - readonly property bool attentionStatus:
true 2643 - function parseJson(text, valueWhenInvalid) {
2645 - return JSON.
parse(
String(text));
2647 - return valueWhenInvalid;
2533 + readonly property
var items: state.items
|| []
2534 + readonly property bool hasItems: items.length
> 0 2651 2536 function refreshFrom(text) {
2652 - state
= parseJson(text, state);
2537 + state
= Util.parseJson(text, state);
2655 - function expandSubmenu(id) {
2657 - refreshFrom(trayService.expandSubmenu(id));
2661 - function activateRow(id) {
2540 + function activate(id) {
2662 2541 if (trayService)
2663 2542 refreshFrom(trayService.activateRow(id));
2667 - function closeMenu(reason) {
2669 - refreshFrom(trayService.closeMenu(reason));
2673 - function rowMark(row) {
2674 - if (row.kind
=== "submenu")
2675 - return row.expanded
? "⌄" : "›";
2677 - if (row.kind
=== "check")
2678 - return row.checked
? "✓" : "□";
2680 - if (row.kind
=== "radio")
2681 - return row.checked
? "●" : "○";
2683 - if (row.kind
=== "disabled")
2689 - function rowRole(row) {
2690 - if (row.kind
=== "disabled")
2691 - return "ui.minor";
2693 - if (row.kind
=== "submenu" && row.expanded)
2694 - return "ui.focus";
2696 - if (row.kind
=== "check" || row.kind
=== "radio")
2699 - return "ui.accent";
2702 - function roleColor(role) {
2706 - if (role
=== "warning")
2707 - return theme.warning;
2709 - if (role
=== "error")
2710 - return theme.error;
2712 - if (role
=== "info")
2713 - return theme.info;
2715 - if (role
=== "ui.minor")
2716 - return theme.ui.minor;
2718 - if (role
=== "ui.focus")
2719 - return theme.ui.focus;
2721 - return theme.ui.accent;
2725 2547 width: parent
? parent.width
: 0 2730 - text:
"System tray" 2732 - wrapMode:
Text.WordWrap
2736 - objectName:
"attentionStatus" 2550 + objectName:
"trayItems" 2551 + visible: root.hasItems
2737 2552 width: parent.width
2744 - color: root.theme
? root.theme.withAlpha(root.state.closeRequested
? root.theme.info
: root.theme.ui.accent,
0.16)
: "transparent" 2746 - border.color: root.theme
? (root.state.closeRequested
? root.theme.info
: root.theme.ui.accent)
: "transparent" 2749 - anchors.centerIn: parent
2752 - text: root.state.closeRequested
? "closing" : "open" 2758 - width: root.width
- 82 2761 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.1)
: "transparent" 2763 - border.color: root.theme
? root.theme.ui.minor
: "transparent" 2766 - anchors.left: parent.left
2767 - anchors.leftMargin:
8 2768 - anchors.right: parent.right
2769 - anchors.rightMargin:
8 2770 - anchors.verticalCenter: parent.verticalCenter
2773 - text: root.state.expandedSubmenu
? `submenu ${root.state.expandedSubmenu}
` : "native tray menu host" 2774 - elide:
Text.ElideRight
2782 - objectName:
"trayItemGrid" 2783 - width: parent.width
2789 - model: [
"activate",
"secondary",
"scroll",
"menu"]
2791 2558 delegate: Rectangle {
2794 - required property string modelData
2561 + required property
var modelData
2562 + readonly property bool
attention: modelData.status
=== "NeedsAttention" 2796 - width:
Math.
floor((root.width
- 18)
/ 4)
2799 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.13)
: "transparent" 2801 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 2567 + color: root.theme
? root.theme.withAlpha(attention
? root.theme.info
: root.theme.ui.accent, attention
? 0.2 : 0.12)
: "transparent" 2569 + border.color: root.theme
? (attention
? root.theme.info
: root.theme.ui.accent)
: "transparent" 2572 + anchors.fill: parent
2573 + anchors.leftMargin:
11 2574 + anchors.rightMargin:
11 2578 + anchors.verticalCenter: parent.verticalCenter
2581 + sourceSize.width:
24 2582 + sourceSize.height:
24 2583 + fillMode:
Image.PreserveAspectFit
2584 + source: itemCell.modelData.icon
|| "" 2585 + visible: status
=== Image.Ready
2589 + anchors.verticalCenter: parent.verticalCenter
2592 + selected: itemCell.attention
2593 + text: itemCell.modelData.title
2594 + width: parent.width
- 34 2595 + elide:
Text.ElideRight
2804 - anchors.centerIn: parent
2807 - text: itemButton.modelData
2811 2601 anchors.fill: parent
2813 - if (itemButton.modelData
=== "menu")
2814 - root.expandSubmenu(
"network");
2815 - else if (itemButton.modelData
=== "activate")
2816 - root.activateRow(
"open");
2602 + onClicked: root.activate(itemCell.modelData.id)
2827 - objectName:
"dbusMenuRows" 2612 + objectName:
"trayEmptyState" 2613 + visible:
!root.hasItems
2828 2614 width: parent.width
2618 + anchors.centerIn: parent
2837 - required property
var modelData
2840 - height: modelData.kind
=== "separator" ? 9 : 32 2843 - visible: rowShell.modelData.kind
=== "separator" 2844 - anchors.left: parent.left
2845 - anchors.right: parent.right
2846 - anchors.verticalCenter: parent.verticalCenter
2848 - color: root.theme
? root.theme.ui.accent
: "transparent" 2853 - visible: rowShell.modelData.kind
!== "separator" 2854 - anchors.fill: parent
2856 - color: root.theme
? root.theme.withAlpha(root.roleColor(root.rowRole(rowShell.modelData)), rowShell.modelData.expanded
? 0.22 : 0.1)
: "transparent" 2858 - border.color: root.roleColor(root.rowRole(rowShell.modelData))
2861 - anchors.left: parent.left
2862 - anchors.leftMargin:
8 2863 - anchors.verticalCenter: parent.verticalCenter
2866 - selected: rowShell.modelData.expanded
2867 - text: root.rowMark(rowShell.modelData)
2872 - anchors.left: parent.left
2873 - anchors.leftMargin:
34 2874 - anchors.right: parent.right
2875 - anchors.rightMargin:
8 2876 - anchors.verticalCenter: parent.verticalCenter
2878 - text: rowShell.modelData.label
2879 - opacity: rowShell.modelData.enabled
? 1 : 0.48 2880 - elide:
Text.ElideRight
2884 - anchors.fill: parent
2885 - enabled: rowShell.modelData.enabled
|| rowShell.modelData.kind
=== "disabled" 2887 - if (rowShell.modelData.kind
=== "submenu")
2888 - root.expandSubmenu(rowShell.modelData.id);
2890 - root.activateRow(rowShell.modelData.id);
2897 - objectName:
"submenuCollapsePolicy" 2898 - visible: rowShell.modelData.kind
=== "submenu" && rowShell.modelData.expanded
2899 - anchors.left: parent.left
2900 - anchors.leftMargin:
34 2901 - anchors.right: parent.right
2902 - anchors.top: parent.bottom
2906 - model: rowShell.modelData.children
|| []
2908 - delegate: Rectangle {
2909 - required property string modelData
2911 - width: parent.width
2622 + anchors.horizontalCenter: parent.horizontalCenter
2626 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.16)
: "transparent" 2629 + anchors.centerIn: parent
2927 - objectName:
"menuClosePropagation" 2928 - width: parent.width
2931 - color: root.theme
? root.theme.withAlpha(root.state.closePropagation
&& root.state.closePropagation.requested
? root.theme.info
: root.theme.ui.minor,
0.12)
: "transparent" 2933 - border.color: root.theme
? (root.state.closePropagation
&& root.state.closePropagation.requested
? root.theme.info
: root.theme.ui.minor)
: "transparent" 2936 - anchors.left: parent.left
2937 - anchors.leftMargin:
8 2938 - anchors.right: closeButton.left
2939 - anchors.verticalCenter: parent.verticalCenter
2942 - text: root.state.closePropagation
? `${root.state.closePropagation.reason
|| "no-close"}
from ${root.state.closePropagation.source
|| "menu"}
` : "no close request" 2943 - elide:
Text.ElideRight
2949 - anchors.right: parent.right
2950 - anchors.rightMargin:
6 2951 - anchors.verticalCenter: parent.verticalCenter
2955 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.14)
: "transparent" 2957 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 2960 - anchors.centerIn: parent
2639 + anchors.horizontalCenter: parent.horizontalCenter
2961 2640 theme: root.theme
2642 + text:
"No tray icons" 2967 - anchors.fill: parent
2968 - onClicked: root.closeMenu(
"panel-close")
2646 + anchors.horizontalCenter: parent.horizontalCenter
2649 + text:
"Background apps show up here" 2980 2661 required property
QtObject theme
2981 2662 required property
QtObject powerService
2982 - property var state: powerService
? parseJson(powerService.stateJson(), {
2663 + property var state: powerService
? Util.parseJson(powerService.stateJson(), {
2985 2666 "externalDevices": [],
3001 2682 readonly property var devices: state.externalDevices
|| []
3002 2683 readonly property
var panel: state.powerPanelContract
|| ({
3004 - readonly property string source:
"Nuguland session Content.qml plus Nuguland SessionScreen.qml plus Nuguland Power.qml" 3005 - readonly property bool upowerSessionPanel:
true 3006 - readonly property bool batteryHero:
true 3007 - readonly property bool externalDeviceBatteryRows:
true 3008 - readonly property bool powerProfileSelector:
true 3009 - readonly property bool keyboardActionGrid:
true 3010 - readonly property bool confirmationStrip:
true 3011 - readonly property bool destructiveTwoStep:
true 3012 2685 readonly property
var sessionActions: [
"lock",
"suspend",
"monitor-off",
"monitor-on",
"logout",
"reboot",
"poweroff"]
3013 2686 readonly property
var profileRows: [
"power-saver",
"balanced",
"performance"]
3015 - function parseJson(text, valueWhenInvalid) {
3017 - return JSON.
parse(
String(text));
3019 - return valueWhenInvalid;
3023 2689 function refreshFrom(text) {
3024 - state
= parseJson(text, state);
2690 + state
= Util.parseJson(text, state);
3027 2693 function setProfile(profile) {
3084 2750 Keys.onReturnPressed: root.state.pendingConfirmation
? root.confirm(root.state.pendingConfirmation)
: root.runSession(
"lock")
3085 2751 Keys.onEnterPressed: root.state.pendingConfirmation
? root.confirm(root.state.pendingConfirmation)
: root.runSession(
"lock")
3090 - text:
"Power and session" 3092 - wrapMode:
Text.WordWrap
3096 2754 objectName:
"batteryHero" 3097 2755 width: parent.width
3100 2758 color: root.theme
? root.theme.withAlpha(root.roleColor(root.battery.role
|| "ui.accent"),
0.16)
: "transparent" 3102 2760 border.color: root.roleColor(root.battery.role
|| "ui.accent")
3114 2772 theme: root.theme
3115 2773 variant:
"title" 3116 - text:
`battery ${root.battery.percent
|| 0}
%` 2774 + text:
`${root.battery.percent
|| 0}
%` 3117 2775 width: parent.width
- 118 3159 2817 theme: root.theme
3160 2818 variant:
"meta" 2819 + visible: root.battery.health
>= 0 3161 2820 text:
`health ${root.battery.health}
%` 3163 2822 horizontalAlignment:
Text.AlignRight
3189 2848 color: root.theme
? root.theme.withAlpha(active
? root.theme.ui.focus
: root.theme.ui.minor, active
? 0.28 : 0.12)
: "transparent" 3191 2850 border.color: root.theme
? (active
? root.theme.ui.focus
: root.theme.ui.accent)
: "transparent" 3229 2888 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.1)
: "transparent" 3231 2890 border.color: root.theme
? root.theme.ui.accent
: "transparent" 3278 2937 radius: pending
? 14 : 11 3279 2938 color: root.theme
? root.theme.withAlpha(pending
? root.theme.warning
: destructive
? root.theme.error
: root.theme.ui.accent, pending
? 0.28 : 0.14)
: "transparent" 3281 2940 border.color: root.theme
? (pending
? root.theme.warning
: destructive
? root.theme.error
: root.theme.ui.accent)
: "transparent" 3305 2964 height: root.state.pendingConfirmation
? 36 : 26 3307 2966 color: root.theme
? root.theme.withAlpha(root.state.pendingConfirmation
? root.theme.warning
: root.theme.ui.minor, root.state.pendingConfirmation
? 0.2 : 0.1)
: "transparent" 3309 2968 border.color: root.theme
? (root.state.pendingConfirmation
? root.theme.warning
: root.theme.ui.minor)
: "transparent" 3314 2973 anchors.verticalCenter: parent.verticalCenter
3315 2974 theme: root.theme
3316 2975 variant:
"meta" 3317 - text: root.state.pendingConfirmation
? `confirm ${root.state.pendingConfirmation}
` : "lock is safe default · Escape cancels" 2976 + text: root.state.pendingConfirmation
? `Confirm ${root.state.pendingConfirmation}
? · Enter` : "Enter locks · Esc closes" 3318 2977 width: parent.width
- (root.state.pendingConfirmation
? 128 : 16)
3319 2978 elide:
Text.ElideRight
3333 2992 color: root.theme
? root.theme.withAlpha(root.theme.warning,
0.18)
: "transparent" 3335 2994 border.color: root.theme
? root.theme.warning
: "transparent" 3355 3014 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.14)
: "transparent" 3357 3016 border.color: root.theme
? root.theme.ui.minor
: "transparent" 3382 3041 required property
QtObject theme
3383 3042 required property
QtObject audioService
3384 - property var state: audioService
? parseJson(audioService.stateJson(), {
3043 + property var state: audioService
? Util.parseJson(audioService.stateJson(), {
3403 3062 readonly property var streams: state.streams
|| []
3404 3063 readonly property
var panel: state.audioPanelContract
|| ({
3406 - readonly property string source:
"Nuguland bar popouts Audio.qml plus Nuguland Mixer.qml MixerEntry.qml" 3407 - readonly property bool pipewireMixerPanel:
true 3408 - readonly property bool outputSelector:
true 3409 - readonly property bool inputSelector:
true 3410 - readonly property bool deviceVolumeSliders:
true 3411 - readonly property bool perStreamRows:
true 3412 - readonly property bool streamTargetReassignment:
true 3413 - readonly property bool noExternalMixer:
true 3065 + readonly property bool pipewireMixerPanel:
!!panel.pipewireMixerPanel
3066 + readonly property bool outputSelector:
!!panel.outputSelector
3067 + readonly property bool inputSelector:
!!panel.inputSelector
3068 + readonly property bool deviceVolumeSliders:
!!panel.deviceVolumeSliders
3069 + readonly property bool perStreamRows:
!!panel.perStreamRows
3070 + readonly property bool streamTargetReassignment:
!!panel.nativeStreamMove
3071 + readonly property bool noExternalMixer:
!!panel.noExternalMixer
3415 - function parseJson(text, valueWhenInvalid) {
3417 - return JSON.
parse(
String(text));
3419 - return valueWhenInvalid;
3423 3074 function refreshFrom(text) {
3424 - state
= parseJson(text, state);
3075 + state
= Util.parseJson(text, state);
3427 3078 function setVolume(id, ratio) {
3451 - function moveStream(id, target) {
3453 - refreshFrom(audioService.moveStream(id, target));
3457 3102 function roleColor(role) {
3459 3104 return "white";
3470 3115 return theme.ui.accent;
3473 - function nextSinkId(current) {
3474 - if (sinks.length
=== 0)
3477 - for (
let i
= 0; i
< sinks.length; i
++) {
3478 - if (sinks[i].id
=== current)
3479 - return sinks[(i
+ 1)
% sinks.length].id;
3482 - return sinks[
0].id;
3486 3119 width: parent
? parent.width
: 0 3491 - text:
"Audio mixer" 3493 - wrapMode:
Text.WordWrap
3497 3122 objectName:
"outputSelector" 3498 3123 width: parent.width
3517 3142 implicitHeight: sinkContent.implicitHeight
+ 12 3519 3144 color: root.theme
? root.theme.withAlpha(active
? root.theme.ui.focus
: root.theme.ui.minor, active
? 0.28 : 0.12)
: "transparent" 3521 3146 border.color: root.theme
? (active
? root.theme.ui.focus
: root.theme.ui.accent)
: "transparent" 3619 3244 color: root.theme
? root.theme.withAlpha(active
? root.theme.ui.focus
: root.theme.ui.minor, active
? 0.25 : 0.12)
: "transparent" 3621 3246 border.color: root.roleColor(modelData.muted
? "ui.minor" : modelData.active
? "warning" : "ui.accent")
3681 3306 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.1)
: "transparent" 3683 3308 border.color: root.theme
? root.theme.ui.accent
: "transparent" 3686 3311 anchors.left: parent.left
3687 - anchors.right: targetButton.left
3312 + anchors.right: parent.right
3688 3313 anchors.verticalCenter: parent.verticalCenter
3689 3314 anchors.leftMargin:
8 3315 + anchors.rightMargin:
8 3712 - objectName:
"streamTargetReassignment" 3713 - anchors.right: parent.right
3714 - anchors.rightMargin:
6 3715 - anchors.verticalCenter: parent.verticalCenter
3719 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.18)
: "transparent" 3721 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 3724 - anchors.centerIn: parent
3731 - anchors.fill: parent
3732 - onClicked: root.moveStream(streamRow.modelData.id, root.nextSinkId(streamRow.modelData.target))
3748 3346 required property
QtObject theme
3749 3347 required property
QtObject mediaService
3750 - property var state: mediaService
? parseJson(mediaService.stateJson(), {
3348 + property var state: mediaService
? Util.parseJson(mediaService.stateJson(), {
3751 3349 "activePlayer": {
3763 3361 readonly property var player: state.activePlayer
|| ({
3765 3363 readonly property
var players: state.players
|| []
3364 + readonly property bool hasMedia: players.length
> 0 3766 3365 readonly property
var panel: state.mediaPanelContract
|| ({
3768 - readonly property string source:
"Nuguland media Details.qml plus Nuguland MprisController.qml" 3769 - readonly property bool coverDetailsProgressTransport:
true 3770 - readonly property bool playerSelectorRail:
true 3771 - readonly property bool noExternalVisualizer:
true 3772 3367 readonly property
var transportActions: [
"shuffle",
"previous",
"playPause",
"next",
"repeat"]
3773 - readonly property string seekPreviewBinding:
"positionLabel follows slider while dragging" 3774 - readonly property
var trackDirectionAnimation: [
"previous",
"next"]
3776 - function parseJson(text, valueWhenInvalid) {
3778 - return JSON.
parse(
String(text));
3780 - return valueWhenInvalid;
3784 3370 function mmss(seconds) {
3785 3371 const total
= Math.
max(
0,
Math.
round(
Number(seconds
|| 0)));
3791 3377 function refreshFrom(text) {
3792 - state
= parseJson(text, state);
3378 + state
= Util.parseJson(text, state);
3795 3381 function runAction(kind) {
3818 3404 width: parent.width
3406 + visible: root.hasMedia
3828 3415 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.24)
: "transparent" 3830 3417 border.color: root.theme
? root.theme.ui.accent
: "transparent" 3857 3444 theme: root.theme
3858 3445 variant:
"title" 3859 - text: root.player.title
|| "media controls" 3446 + text: root.player.title
|| root.player.identity
|| "Untitled" 3860 3447 width: parent.width
3861 3448 elide:
Text.ElideRight
3865 3452 theme: root.theme
3866 - text: root.player.artist
|| "unknown artist" 3453 + text: root.player.artist
|| "" 3454 + visible: text.length
> 0 3867 3455 width: parent.width
3868 3456 elide:
Text.ElideRight
3872 3460 theme: root.theme
3873 3461 variant:
"meta" 3874 - text: root.player.album
|| "unknown album" 3462 + text: root.player.album
|| "" 3463 + visible: text.length
> 0 3875 3464 width: parent.width
3876 3465 elide:
Text.ElideRight
3897 3486 color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.28)
: "transparent" 3899 3488 border.color: root.theme
? root.theme.ui.minor
: "transparent" 3944 3533 color: root.theme
? root.theme.withAlpha(modelData
=== "playPause" ? root.theme.ui.focus
: root.theme.ui.accent,
0.2)
: "transparent" 3946 3535 border.color: root.theme
? root.theme.ui.accent
: "transparent" 3972 3561 objectName:
"playerSelectorRail" 3973 3562 width: parent.width
3564 + visible: root.players.length
> 1 3977 3567 model: root.players
3986 3576 width:
Math.max(
76, playerName.implicitWidth
+ 18)
3988 3578 color: root.theme
? root.theme.withAlpha(active
? root.theme.ui.focus
: root.theme.ui.minor, active
? 0.3 : 0.14)
: "transparent" 3990 3580 border.color: root.theme
? (active
? root.theme.ui.focus
: root.theme.ui.accent)
: "transparent" 3604 + objectName:
"mediaEmptyState" 3605 + visible:
!root.hasMedia
4017 3606 width: parent.width
4018 - wrapMode:
Text.WordWrap
4023 - component
ScreenshotsPanel:
Column {
4026 - required property QtObject theme
4027 - required property QtObject screenshotsService
4028 - property
var state: screenshotsService
? parseJson(screenshotsService.stateJson(), {
4031 - "selectionVisuals": {
4034 - "screenshotsPanelContract": {
4039 - "selectionVisuals": {
4042 - "screenshotsPanelContract": {
4045 - readonly property
var selection: state.selection
|| ({
4047 - readonly property
var visuals: state.selectionVisuals
|| ({
4049 - readonly property
var selectionRect: selection.rect
|| ({
4055 - readonly property
var recentRows: state.recent
|| []
4056 - readonly property
var panel: state.screenshotsPanelContract
|| ({
4058 - readonly property string
source:
"Nuguland AreaPicker.qml plus Nuguland RegionSelector.qml WRegionSelectionPanel.qml" 4059 - readonly property bool
niriCapturePanel:
true 4060 - readonly property bool
captureActionGrid:
true 4061 - readonly property bool
regionSelectionPreview:
true 4062 - readonly property bool
recentCaptureRows:
true 4063 - readonly property bool
colorPickSwatch:
true 4064 - readonly property bool
toolbarActionRail:
true 4065 - readonly property bool
boundedCornerAccents:
true 4067 - function parseJson(text, valueWhenInvalid) {
4069 - return JSON.
parse(
String(text));
4071 - return valueWhenInvalid;
4075 - function refreshFrom(text) {
4076 - state
= parseJson(text, state);
4079 - function runCapture(kind) {
4080 - if (screenshotsService)
4081 - refreshFrom(screenshotsService.capture(kind,
`/tmp/nuguland-${kind}
.png`));
4085 - function pickColor() {
4086 - if (screenshotsService)
4087 - refreshFrom(screenshotsService.pickColor());
4091 - function beginRegion() {
4092 - if (screenshotsService)
4093 - refreshFrom(screenshotsService.beginSelection(
96,
64));
4097 - function demoRegion() {
4098 - if (
!screenshotsService)
4101 - refreshFrom(screenshotsService.beginSelection(
120,
80));
4102 - refreshFrom(screenshotsService.updateSelection(
40,
200));
4105 - function completeRegion() {
4106 - if (screenshotsService)
4107 - refreshFrom(screenshotsService.completeSelection(
"/tmp/nuguland-region.png"));
4111 - function cancelRegion() {
4112 - if (screenshotsService)
4113 - refreshFrom(screenshotsService.cancelSelection());
4117 - function clearRecent() {
4118 - if (screenshotsService)
4119 - refreshFrom(screenshotsService.clear());
4123 - function recordAction(kind, id) {
4124 - if (screenshotsService)
4125 - refreshFrom(screenshotsService.recordAction(kind, id));
4130 - width: parent
? parent.width
: 0 4135 - text:
"Screenshots and color picker" 4137 - wrapMode:
Text.WordWrap
4141 - objectName:
"captureActionGrid" 4142 - width: parent.width
4149 - "id":
"focused-screen",
4152 - "id":
"focused-window",
4155 - "id":
"select-region",
4158 - "id":
"pick-color",
4162 - delegate: Rectangle {
4165 - required property
var modelData
4167 - width:
Math.
floor((root.width
- 6)
/ 2)
4170 - color: root.theme
? root.theme.withAlpha(modelData.id
=== "pick-color" ? root.theme.info
: root.theme.ui.accent,
0.16)
: "transparent" 4172 - border.color: root.theme
? (modelData.id
=== "pick-color" ? root.theme.info
: root.theme.ui.accent)
: "transparent" 4175 - anchors.centerIn: parent
4178 - text: captureButton.modelData.label
4182 - anchors.fill: parent
4184 - if (captureButton.modelData.id
=== "select-region")
4185 - root.demoRegion();
4186 - else if (captureButton.modelData.id
=== "pick-color")
4189 - root.runCapture(captureButton.modelData.id);
4202 - objectName:
"regionSelectionPreview" 4203 - width: parent.width
4207 - color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.72)
: "transparent" 4209 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 4212 - anchors.fill: parent
4213 - color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop, root.visuals.dimmedMask
&& root.visuals.dimmedMask.visible
? 0.42 : 0.18)
: "transparent" 4219 - readonly property real
sx: preview.width
/ 240 4220 - readonly property real
sy: preview.height
/ 240 4222 - objectName:
"clear-cutout" 4223 - x:
Math.
max(
8,
Math.
min(preview.width
- width
- 8, root.selectionRect.x
* sx))
4224 - y:
Math.
max(
8,
Math.
min(preview.height
- height
- 8, root.selectionRect.y
* sy))
4225 - width:
Math.
max(
24,
Math.
min(preview.width
- 16, root.selectionRect.width
* sx))
4226 - height:
Math.
max(
18,
Math.
min(preview.height
- 16, root.selectionRect.height
* sy))
4228 - color: root.theme
? root.theme.withAlpha(root.theme.content.backdrop,
0.1)
: "transparent" 4230 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 4233 - objectName:
"boundedCornerAccents" 4238 - "x": cutout.width
- 7,
4242 - "y": cutout.height
- 7 4244 - "x": cutout.width
- 7,
4245 - "y": cutout.height
- 7 4248 - delegate: Rectangle {
4249 - required property
var modelData
4256 - color: root.theme
? root.theme.ui.accent
: "white" 4262 - anchors.centerIn: parent
4266 - text: root.visuals.dimensions
? root.visuals.dimensions.text
: "0×0" 4274 - objectName:
"toolbarActionRail" 4275 - width: parent.width
4279 - model: [
"copy",
"save",
"cancel",
"color"]
4281 - delegate: Rectangle {
4284 - required property string modelData
4286 - width:
Math.
floor((root.width
- 18)
/ 4)
4289 - color: root.theme
? root.theme.withAlpha(modelData
=== "cancel" ? root.theme.error
: root.theme.ui.accent,
0.14)
: "transparent" 4291 - border.color: root.theme
? (modelData
=== "cancel" ? root.theme.error
: root.theme.ui.accent)
: "transparent" 4294 - anchors.centerIn: parent
4297 - text: toolButton.modelData
4301 - anchors.fill: parent
4303 - if (toolButton.modelData
=== "cancel")
4304 - root.cancelRegion();
4305 - else if (toolButton.modelData
=== "color")
4307 - else if (toolButton.modelData
=== "save")
4308 - root.completeRegion();
4310 - root.recordAction(
"copy", root.recentRows.length
> 0 ? root.recentRows[
0].id
: "selection");
4321 - width: parent.width
4325 - objectName:
"colorPickSwatch" 4329 - color: root.state.lastColor
&& root.state.lastColor.length
> 0 ? root.state.lastColor
: (root.theme
? root.theme.withAlpha(root.theme.info,
0.18)
: "transparent")
4331 - border.color: root.theme
? root.theme.info
: "transparent" 4337 - text: root.state.lastColor
&& root.state.lastColor.length
> 0 ? root.state.lastColor
: "pick color" 4338 - width: parent.width
- 76 4339 - verticalAlignment:
Text.AlignVCenter
4345 - objectName:
"recentCaptureRows" 4346 - width: parent.width
4350 - model: root.recentRows.slice(
0,
3)
4352 - delegate: Rectangle {
4355 - required property
var modelData
4360 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.1)
: "transparent" 4362 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 4365 - anchors.left: parent.left
4366 - anchors.leftMargin:
8 4367 - anchors.verticalCenter: parent.verticalCenter
4369 - text:
`${recentRow.modelData.kind}
` 4370 - width: parent.width
- 108 4371 - elide:
Text.ElideRight
4375 - anchors.right: parent.right
4376 - anchors.rightMargin:
8 4377 - anchors.verticalCenter: parent.verticalCenter
4389 - height: root.recentRows.length
=== 0 ? 28 : 0 4390 - visible: height
> 0 4392 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.08)
: "transparent" 4394 - border.color: root.theme
? root.theme.ui.minor
: "transparent" 4397 - anchors.centerIn: parent
4400 - text:
"no captures yet" 4409 - component
WindowPanel:
Column {
4412 - required property QtObject theme
4413 - required property QtObject niriService
4414 - property
var card: niriService
? parseJson(niriService.windowRuleMetadata(), {
4420 - "detailsRows": [],
4422 - "windowPanelContract": {
4430 - "detailsRows": [],
4432 - "windowPanelContract": {
4435 - readonly property
var panel: card.windowPanelContract
|| ({
4437 - readonly property
var preview: card.previewSlot
|| ({
4439 - readonly property
var actions: card.actions
|| []
4440 - readonly property
var details: card.detailsRows
|| []
4441 - readonly property
var hints: card.ruleHints
|| []
4442 - readonly property string
source:
"Nuguland WindowInfo.qml Details.qml Buttons.qml plus Nuguland TaskViewContent.qml" 4443 - readonly property bool
niriWindowCardPanel:
true 4444 - readonly property bool
previewSlotCard:
true 4445 - readonly property bool
detailsRows:
true 4446 - readonly property bool
ruleHintRows:
true 4447 - readonly property bool
windowActionRail:
true 4448 - readonly property bool
workspaceMoveAffordance:
true 4450 - function parseJson(text, valueWhenInvalid) {
4452 - return JSON.
parse(
String(text));
4454 - return valueWhenInvalid;
4458 - function refreshFrom(text) {
4459 - card
= parseJson(text, card);
4462 - function runAction(kind) {
4464 - refreshFrom(niriService.windowCardAction(kind));
4468 - function roleColor(role) {
4472 - if (role
=== "warning")
4473 - return theme.warning;
4475 - if (role
=== "error")
4476 - return theme.error;
4478 - if (role
=== "ui.minor")
4479 - return theme.ui.minor;
4481 - return theme.ui.accent;
4485 - width: parent
? parent.width
: 0 4490 - text:
"Focused window" 4492 - wrapMode:
Text.WordWrap
4496 - objectName:
"previewSlotCard" 4497 - width: parent.width
4500 - color: root.theme
? root.theme.withAlpha(root.preview.available
? root.theme.ui.focus
: root.theme.ui.minor, root.preview.available
? 0.2 : 0.1)
: "transparent" 4502 - border.color: root.theme
? (root.preview.available
? root.theme.ui.focus
: root.theme.ui.minor)
: "transparent" 4505 - anchors.fill: parent
4506 - anchors.margins:
10 4512 - text: root.card.title
|| "no focused window" 4513 - width: parent.width
4514 - elide:
Text.ElideRight
4519 - text: root.card.appId
|| "niri toplevel" 4520 - width: parent.width
4521 - elide:
Text.ElideRight
3610 + anchors.centerIn: parent
4525 - width: parent.width
4528 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.22)
: "transparent" 4531 - anchors.left: parent.left
4532 - anchors.top: parent.top
4533 - anchors.bottom: parent.bottom
4534 - width: parent.width
* (root.preview.available
? 0.72 : 0.24)
4535 - radius: parent.radius
4536 - color: root.theme
? root.theme.ui.accent
: "white" 4546 - objectName:
"detailsRows" 4547 - width: parent.width
4551 - model: root.details
4553 - delegate: Rectangle {
4556 - required property
var modelData
4561 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.08)
: "transparent" 4563 - border.color: root.roleColor(detailRow.modelData.role
|| "ui.minor")
4566 - anchors.left: parent.left
4567 - anchors.leftMargin:
8 4568 - anchors.verticalCenter: parent.verticalCenter
4571 - text: detailRow.modelData.label
4573 - elide:
Text.ElideRight
4577 - anchors.left: parent.left
4578 - anchors.leftMargin:
96 4579 - anchors.right: parent.right
4580 - anchors.rightMargin:
8 4581 - anchors.verticalCenter: parent.verticalCenter
4583 - text: detailRow.modelData.value
|| "" 4584 - elide:
Text.ElideRight
4594 - objectName:
"ruleHintRows" 4595 - width: parent.width
4601 - text:
"rule hints" 4602 - visible: root.hints.length
> 0 4608 - delegate: Rectangle {
4611 - required property string modelData
4616 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.1)
: "transparent" 4618 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 4621 - anchors.left: parent.left
4622 - anchors.right: parent.right
4623 - anchors.leftMargin:
8 4624 - anchors.rightMargin:
8 4625 - anchors.verticalCenter: parent.verticalCenter
4628 - text: hintRow.modelData
4629 - elide:
Text.ElideRight
4638 - height: root.hints.length
=== 0 ? 26 : 0 4639 - visible: height
> 0 4641 - color: root.theme
? root.theme.withAlpha(root.theme.ui.minor,
0.08)
: "transparent" 4643 - border.color: root.theme
? root.theme.ui.minor
: "transparent" 4646 - anchors.centerIn: parent
4649 - text:
"no rule hint until a window is focused" 4657 - objectName:
"workspaceMoveAffordance" 4658 - width: parent.width
4661 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.12)
: "transparent" 4663 - border.color: root.theme
? root.theme.ui.accent
: "transparent" 4666 - anchors.left: parent.left
4667 - anchors.leftMargin:
8 4668 - anchors.verticalCenter: parent.verticalCenter
4671 - text:
`workspace move route: ${root.card.actionRow
? root.card.actionRow.route
: "Niri.qml"}
` 4672 - width: parent.width
- 16 4673 - elide:
Text.ElideRight
4679 - objectName:
"windowActionRail" 4680 - width: parent.width
4684 - model: root.actions
4686 - delegate: Rectangle {
4689 - required property
var modelData
4691 - width:
Math.
floor((root.width
- 18)
/ 4)
4694 - color: root.theme
? root.theme.withAlpha(modelData.destructive
? root.theme.error
: root.theme.ui.accent,
0.14)
: "transparent" 4696 - border.color: root.theme
? (modelData.destructive
? root.theme.error
: root.theme.ui.accent)
: "transparent" 3614 + anchors.horizontalCenter: parent.horizontalCenter
3618 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.16)
: "transparent" 4699 3621 anchors.centerIn: parent
4700 3622 theme: root.theme
4702 - text: actionButton.modelData.id
=== "toggle-fullscreen" ? "full" : actionButton.modelData.id
=== "move-workspace" ? "move" : actionButton.modelData.label
4703 - elide:
Text.ElideRight
4707 - anchors.fill: parent
4708 - onClicked: root.runAction(actionButton.modelData.id)
3631 + anchors.horizontalCenter: parent.horizontalCenter
3634 + text:
"Nothing playing" 3638 + anchors.horizontalCenter: parent.horizontalCenter
3641 + text:
"Start a track — controls appear here" 4720 - text: root.card.lastWindowAction
&& root.card.lastWindowAction.kind
? `last: ${root.card.lastWindowAction.kind}
→ ${root.card.lastWindowAction.niriAction}
` : "Enter focuses · Delete closes" 4721 - width: parent.width
4722 - elide:
Text.ElideRight