Refine notch mode: own island modules, Super+N, fuller pages, header strip

- Notch islands and a header strip in the open notch take their own module
  lists (Settings → Notch → Modules); the strip scrolls sideways on wheel.
- `glassmxrph notch mode` swaps notch mode and the full bar.
- The left column fills its space: large media player (streams show LIVE),
  a full-height Performance card and a clock over the calendar.
- A cog edits the tiles in the Control Center editor, then the notch returns.
- The launcher uses the notch shape and keeps its mode pills inside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-12 16:57:23 +01:00
1 parent 5217af4f67
commit 74b6ad50ec
14 files changed
+530 -99

No files matched your search

+168 -41
View File
@@ -5,11 +5,11 @@ import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import "../components"
import "../bar"
import "../controlcenter"
import "../controlcenter/GridLogic.js" as Grid
import "../core"
import "../dashboard"
import "../media"
import "../services"
import "../theme"
import "../widgets/faces" as Faces
@@ -35,10 +35,13 @@ PanelWindow {
readonly property int sideWidth: 330
readonly property int middleWidth: 440
readonly property int columnGap: 44
// The open notch's header: the band plus room for the divider below it.
readonly property real header: band + 8
readonly property int gutter: 16
// Open size of each view, then the morph between the pill and that size.
readonly property real mainWidth: 2 * sideWidth + middleWidth + 2 * columnGap + 2 * pad
readonly property real mainHeight: Math.max(440, middle.contentHeight + band + pad)
readonly property real mainHeight: Math.max(600, middle.contentHeight + header + gutter + pad)
readonly property Item computerItem: computerLoader.item as Item
readonly property real computerWidth: (computerItem ? computerItem.implicitWidth : 800) + 2 * pad
readonly property real computerHeight: band + 44 + (computerItem ? computerItem.implicitHeight : 400) + pad
@@ -147,6 +150,7 @@ PanelWindow {
precision: SystemClock.Minutes
}
Row {
id: clockRow
anchors.horizontalCenter: parent.horizontalCenter
y: (root.band - height) / 2
spacing: 8
@@ -167,13 +171,84 @@ PanelWindow {
}
}
// Header: chosen bar modules left of the clock (the wheel scrolls them
// sideways), the tile editor cog, and a divider under it all.
readonly property bool headerShown: !root.computer && root.contentOpacity > 0
Flickable {
id: strip
objectName: "notchStrip"
x: main.x
width: Math.max(0, clockRow.x - 24 - main.x)
height: root.band
visible: body.headerShown
opacity: root.contentOpacity
contentWidth: stripRow.implicitWidth
contentHeight: height
flickableDirection: Flickable.HorizontalFlick
boundsBehavior: Flickable.StopAtBounds
clip: true
ModuleRow {
id: stripRow
position: "center"
active: ShellState.notchOpen
modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "strip")
barScreen: root.screen
anchors.verticalCenter: parent.verticalCenter
}
}
MouseArea {
anchors.fill: strip
visible: strip.visible
acceptedButtons: Qt.NoButton
onWheel: wheel => {
const delta = wheel.angleDelta.y !== 0 ? wheel.angleDelta.y : wheel.angleDelta.x;
strip.contentX = Math.max(0, Math.min(strip.contentWidth - strip.width, strip.contentX - delta * 0.6));
}
}
Rectangle {
objectName: "notchEditControls"
x: main.x + root.sideWidth + root.columnGap + root.middleWidth - width
y: (root.band - height) / 2
width: 30
height: 30
radius: 15
visible: body.headerShown
opacity: root.contentOpacity
color: cogArea.containsMouse ? Theme.hover : Theme.transparent
Accessible.role: Accessible.Button
Accessible.name: "Edit controls"
Text {
anchors.centerIn: parent
text: Icons.available ? "󰒓" : "⚙"
font.family: Icons.available ? Icons.family : ""
font.pixelSize: 16
color: Theme.textSecondary
}
MouseArea {
id: cogArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: ShellState.editControlCenter()
}
}
Rectangle {
x: main.x
y: root.header
width: main.width
height: 1
visible: body.headerShown
opacity: root.contentOpacity
color: Theme.hairline
}
// Main view ----------------------------------------------------------
Item {
id: main
x: (root.bodyWidth - root.mainWidth) / 2 + root.pad
y: root.band
y: root.header + root.gutter
width: root.mainWidth - 2 * root.pad
height: root.targetHeight - root.band - root.pad
height: root.targetHeight - root.header - root.gutter - root.pad
visible: opacity > 0
opacity: root.computer ? 0 : root.contentOpacity
Behavior on opacity {
@@ -210,32 +285,28 @@ PanelWindow {
}
}
// Media
Item {
width: pager.width
NotchMedia {
width: pager.width - 16
height: pager.height
MediaCard {
anchors.centerIn: parent
width: parent.width - 20
compact: true
color: Theme.transparent
border.width: 0
}
active: ShellState.notchOpen && pager.page === 0
}
// Performance: click for the full view.
Item {
id: perf
width: pager.width
width: pager.width - 16
height: pager.height
readonly property var disk: (MetricsService.snapshot.storage || []).find(s => s.available) || ({})
readonly property var gpu: MetricsService.gpu || ({})
readonly property var rows: [["CPU", [MetricsService.value(MetricsService.cpu.temperature, " °C"), MetricsService.value(MetricsService.cpu.frequency / 1000, " GHz", 2)].filter(v => v !== "—").join(" · ") || "—"], ["GPU", Number.isFinite(gpu.percent) ? Math.round(gpu.percent) + "%" + (Number.isFinite(gpu.temperature) ? " · " + Math.round(gpu.temperature) + " °C" : "") : "—"], ["Memory", MetricsService.bytes(MetricsService.ram.used) + " / " + MetricsService.bytes(MetricsService.ram.total)], ["Network", "↓ " + MetricsService.bytes(MetricsService.network.download) + "/s ↑ " + MetricsService.bytes(MetricsService.network.upload) + "/s"]]
Demand {
service: MetricsService
active: ShellState.notchOpen && pager.page === 1
}
Rectangle {
anchors.centerIn: parent
width: parent.width - 20
height: perfColumn.implicitHeight + 36
radius: Math.max(12, Theme.radius * 0.75)
anchors.fill: parent
anchors.topMargin: 6
anchors.bottomMargin: 6
radius: Math.max(16, Theme.radius)
color: perfArea.containsMouse ? Theme.hover : Theme.surfaceVariant
border.width: 1
border.color: Theme.hairline
@@ -245,17 +316,16 @@ PanelWindow {
}
}
Column {
id: perfColumn
anchors.centerIn: parent
width: parent.width - 36
spacing: 18
width: parent.width - 40
spacing: 22
Item {
width: parent.width
height: 22
height: 24
Text {
text: "Your computer"
color: Theme.text
font.pixelSize: 15
font.pixelSize: 17
font.weight: Font.DemiBold
}
Text {
@@ -263,35 +333,61 @@ PanelWindow {
text: Icons.available ? "󰅂" : "›"
font.family: Icons.available ? Icons.family : ""
color: Theme.textSecondary
font.pixelSize: 18
font.pixelSize: 20
}
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 14
spacing: 10
Gauge {
size: 76
size: (perf.width - 40 - 20) / 3
value: MetricsService.cpu.percent
caption: "CPU"
}
Gauge {
size: 76
size: (perf.width - 40 - 20) / 3
value: MetricsService.ram.percent
caption: "Memory"
}
Gauge {
size: 76
size: (perf.width - 40 - 20) / 3
value: perf.disk.percent
caption: "Disk"
}
}
Text {
Column {
width: parent.width
horizontalAlignment: Text.AlignHCenter
readonly property var gpu: MetricsService.gpu || ({})
text: Number.isFinite(gpu.percent) ? "GPU " + Math.round(gpu.percent) + "%" + (Number.isFinite(gpu.temperature) ? " · " + Math.round(gpu.temperature) + " °C" : "") : "Click for details"
color: Theme.textSecondary
font.pixelSize: 12
Repeater {
model: perf.rows
Item {
required property var modelData
required property int index
width: parent.width
height: 38
Rectangle {
visible: parent.index > 0
width: parent.width
height: 1
color: Theme.hairline
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: parent.modelData[0]
color: Theme.textSecondary
font.pixelSize: 13
}
Text {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: parent.modelData[1]
color: Theme.text
font.pixelSize: 13
font.features: {
"tnum": 1
}
}
}
}
}
}
MouseArea {
@@ -306,12 +402,35 @@ PanelWindow {
}
// Calendar
Item {
width: pager.width
width: pager.width - 16
height: pager.height
Column {
id: dateHead
anchors.horizontalCenter: parent.horizontalCenter
y: 6
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, ConfigService.ready && !ConfigService.data.bar.clock.use24Hour ? "h:mm" : "HH:mm")
color: Theme.text
font.pixelSize: 54
font.weight: Font.Light
font.features: {
"tnum": 1
}
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, d MMMM")
color: Theme.textSecondary
font.pixelSize: 14
}
}
Faces.CalendarFace {
anchors.centerIn: parent
width: parent.width - 20
height: Math.min(parent.height, 300)
anchors.left: parent.left
anchors.right: parent.right
anchors.top: dateHead.bottom
anchors.topMargin: 14
anchors.bottom: parent.bottom
}
}
}
@@ -358,8 +477,9 @@ PanelWindow {
}
Rectangle {
x: root.sideWidth + root.columnGap / 2
y: -root.gutter
width: 1
height: parent.height
height: parent.height + root.gutter
color: Theme.hairline
}
@@ -485,8 +605,9 @@ PanelWindow {
}
Rectangle {
x: root.sideWidth + root.columnGap + root.middleWidth + root.columnGap / 2
y: -root.gutter
width: 1
height: parent.height
height: parent.height + root.gutter
color: Theme.hairline
}
@@ -514,7 +635,7 @@ PanelWindow {
x: root.pad
y: root.band
width: root.bodyWidth - 2 * root.pad
height: root.bodyHeight - root.band - root.pad
height: Math.max(0, root.bodyHeight - root.band - root.pad)
visible: opacity > 0
opacity: root.computer ? root.contentOpacity : 0
Behavior on opacity {
@@ -573,6 +694,12 @@ PanelWindow {
function page(index: int): void {
pager.go(index);
}
function editControls(): void {
ShellState.editControlCenter();
}
function toggleMode(): bool {
return ShellState.toggleNotchMode();
}
function view(name: string): void {
ShellState.notchView = name === "computer" ? "computer" : "main";
}