From a32c4cb0dabac85229bd6c90720966a1ca1d4a5c Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 00:53:57 +0800 Subject: [PATCH 01/39] Control center: the main view The shell spec's control center, its main view: Wi-Fi and Bluetooth tiles (tap toggles, the chevron, a long press or a right click opens the module), brightness with its "auto" mark and volume with the output as a chip, the Mic, Rotation, Awake and Keyboard toggles, the dimmed tiles still waiting for their backend (power profiles, Focus, Night Light, media), and the battery line with the session's power button. An iPad shows it as a panel below the bar at the right over the dimmed screen, a phone as the whole screen with the sliders as tall squares. It reads the same status objects as the bar and the lock. Super+Ctrl+1 opens it (upstream's key for the bar's first panel on the right, which the status cluster becomes), as does `omarchy-shell omarchy.controlcenter toggle`. Keyboard: Tab and arrows move by position, Enter or Space act, left and right move a slider, right opens a tile's module, Esc closes. Until the module pages exist, a module opens the bar's panel for it. Assisted-by: LLM --- desktop/shell/default/i18n/en/shell.json | 16 + desktop/shell/labwc-rc.xml | 5 + .../shell/controlcenter/ControlCenter.qml | 684 ++++++++++++++++++ desktop/shell/shell/shell.qml | 3 + docs/upstream.md | 4 +- 5 files changed, 710 insertions(+), 2 deletions(-) create mode 100644 desktop/shell/shell/controlcenter/ControlCenter.qml diff --git a/desktop/shell/default/i18n/en/shell.json b/desktop/shell/default/i18n/en/shell.json index be763c01..17a0f741 100644 --- a/desktop/shell/default/i18n/en/shell.json +++ b/desktop/shell/default/i18n/en/shell.json @@ -245,6 +245,22 @@ "clipboard.imageFrom": "Image from %1", "clipboard.screenshotFrom": "Screenshot from %1", "clipboard.search": "Search clipboard…", + "controlCenter.auto": "auto", + "controlCenter.awake": "Awake", + "controlCenter.balanced": "Balanced", + "controlCenter.bluetooth": "Bluetooth", + "controlCenter.connectedCount": "%1 connected", + "controlCenter.focus": "Focus", + "controlCenter.keyboard": "Keyboard", + "controlCenter.media": "Media", + "controlCenter.mic": "Mic", + "controlCenter.night": "Night", + "controlCenter.notConnected": "Not connected", + "controlCenter.off": "Off", + "controlCenter.rotation": "Rotation", + "controlCenter.signIn": "Sign in required", + "controlCenter.wifi": "Wi-Fi", + "controlCenter.wired": "Wired", "clock.backToToday": "Back to today", "clock.born": "BORN", "clock.dayMonthFormat": "MMMM d", diff --git a/desktop/shell/labwc-rc.xml b/desktop/shell/labwc-rc.xml index 791863cd..2885019a 100644 --- a/desktop/shell/labwc-rc.xml +++ b/desktop/shell/labwc-rc.xml @@ -83,6 +83,11 @@ + + + + diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml new file mode 100644 index 00000000..01307805 --- /dev/null +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -0,0 +1,684 @@ +import QtQuick +import Quickshell +import Quickshell.Io +import Quickshell.Networking +import Quickshell.Wayland +import Quickshell.Services.Pipewire +import qs.Commons +import qs.Commons as Commons +import qs.Ui +import "../plugins/panels/network" as Network +import "../plugins/panels/bluetooth" as BluetoothStatus +import "../plugins/panels/power" as Power +import "../plugins/panels/bluetooth/Model.js" as BluetoothModel +import "../plugins/status" as StatusParts + +// The control center (SHELL-SPEC, step 2): the main view. States you flip +// and the two sliders, over the same status objects the bar and the lock +// read. On an iPad a panel below the bar at the right with the screen dimmed; +// on a phone the whole screen. Until its module pages exist, a tile's chevron +// and the battery line open the bar's panels. +Item { + id: root + + property var shell: null + property bool opened: false + property bool mapped: false + property real reveal: 0 + + readonly property bool gpu: Quickshell.env("QT_QUICK_BACKEND") !== "software" + readonly property real screenWidth: panel.width > 0 ? panel.width : 1024 + readonly property real screenHeight: panel.height > 0 ? panel.height : 768 + readonly property bool phone: Math.min(screenWidth, screenHeight) < 600 + readonly property int barInset: Style.bar.sizeHorizontal + readonly property int touchMin: Style.space(44) + readonly property int gap: Style.space(8) + readonly property int pad: Style.space(12) + readonly property int cardWidth: phone ? screenWidth : Style.space(356) + readonly property color text: Commons.Color.popups.text + readonly property color onFill: Commons.Color.accent + readonly property color onText: Commons.Color.background + + // ------------------------------------------------------------ state + + Network.Status { id: network } + BluetoothStatus.Status { id: bluetooth } + Power.Status { id: battery } + StatusParts.RotationLock { id: rotation } + + readonly property var idleService: shell ? shell.firstPartyServiceFor("omarchy.idle") : null + readonly property bool stayAwake: idleService ? idleService.stayAwake === true : false + + readonly property var sink: Pipewire.defaultAudioSink + readonly property var source: Pipewire.defaultAudioSource + PwObjectTracker { objects: [root.sink, root.source].filter(function(n) { return !!n }) } + readonly property real volume: sink && sink.audio ? sink.audio.volume : 0 + readonly property bool micMuted: UntypedInput.active + ? (!UntypedInput.known || UntypedInput.muted) + : !(source && source.audio) || source.audio.muted + readonly property bool micKnown: UntypedInput.active ? UntypedInput.known : !!(source && source.audio) + + property int brightness: -1 + property bool autoBrightness: false + + readonly property string wifiSubtitle: { + if (!network.wifiEnabled) return Commons.I18n.t("controlCenter.off") + if (network.hasCaptivePortal) return Commons.I18n.t("controlCenter.signIn") + if (network.kind === "wifi" && network.ssid !== "") return network.ssid + if (network.kind === "ethernet") return Commons.I18n.t("controlCenter.wired") + return Commons.I18n.t("controlCenter.notConnected") + } + readonly property string bluetoothSubtitle: { + if (!bluetooth.enabled) return Commons.I18n.t("controlCenter.off") + var n = bluetooth.connectedDevices.length + if (n === 1) return BluetoothModel.deviceLabel(bluetooth.connectedDevices[0]) + if (n > 1) return Commons.I18n.t("controlCenter.connectedCount").arg(Commons.I18n.formatNumber(n)) + return Commons.I18n.t("controlCenter.notConnected") + } + readonly property string outputName: sink ? String(sink.nickname || sink.description || "") : "" + readonly property string batteryLine: { + if (battery.displayedPercentage === null) return "" + var line = Commons.I18n.formatNumber(battery.displayedPercentage) + "%" + var time = String(battery.batteryInfo.time || "") + return time !== "" && !battery.externalPower ? line + " · " + time : line + } + + // ---------------------------------------------------------- actions + + function run(argv) { Quickshell.execDetached(argv) } + function omarchy(name) { return (Quickshell.env("OMARCHY_PATH") || "/usr/share/omarchy") + "/bin/" + name } + + // Until the pages exist: the bar's panel for that module. + function openPage(module) { + root.close() + run(["omarchy-shell", "shell", "toggle", module]) + } + + function toggleWifi() { Networking.wifiEnabled = !Networking.wifiEnabled } + function toggleBluetooth() { if (bluetooth.adapter) bluetooth.adapter.enabled = !bluetooth.adapter.enabled } + function toggleMic() { + if (UntypedInput.active) { if (UntypedInput.known) UntypedInput.setMuted(!UntypedInput.muted) } + else if (source && source.audio) source.audio.muted = !source.audio.muted + } + function toggleRotation() { run([omarchy("omarchy-rotation-lock"), rotation.locked ? "off" : "on"]); rotation.locked = !rotation.locked } + function toggleAwake() { if (idleService) idleService.setIdleEnabled(root.stayAwake) } + function showKeyboard() { root.close(); run([omarchy("omarchy-keyboard"), "toggle"]) } + function sessionActions() { + root.close() + if (root.shell) root.shell.summon("omarchy.menu", JSON.stringify({ menu: "system" })) + } + function setVolume(value) { + if (sink && sink.audio) sink.audio.volume = Math.max(0, Math.min(1, value)) + } + function setBrightness(percent) { + root.brightness = Math.max(1, Math.min(100, Math.round(percent))) + brightnessSet.restart() + } + + Timer { + id: brightnessSet + interval: 60 + onTriggered: root.run(["omarchy-brightness-display", "--no-osd", root.brightness + "%"]) + } + Process { + id: brightnessRead + command: ["omarchy-brightness-display"] + stdout: StdioCollector { + waitForEnd: true + onStreamFinished: { + var value = parseInt(text, 10) + root.brightness = isNaN(value) ? -1 : value + } + } + } + Process { + id: autoRead + command: ["omarchy-auto-brightness", "status"] + stdout: StdioCollector { + waitForEnd: true + onStreamFinished: root.autoBrightness = /auto-brightness: on/.test(text) + } + } + + // ------------------------------------------------------------ cells + // Each focusable cell: kind (tile, slider, toggle, later), what it shows + // and does. The keyboard walks them in this order, arrows by position. + + readonly property var toggles: [ + { key: "mic", glyph: root.micMuted ? "󰍭" : "󰍬", label: Commons.I18n.t("controlCenter.mic"), + on: !root.micMuted, enabled: root.micKnown, act: root.toggleMic }, + { key: "rotation", glyph: "󰌾", label: Commons.I18n.t("controlCenter.rotation"), + on: rotation.locked, enabled: true, act: root.toggleRotation }, + { key: "awake", glyph: "", label: Commons.I18n.t("controlCenter.awake"), + on: root.stayAwake, enabled: !!root.idleService, act: root.toggleAwake }, + { key: "keyboard", glyph: "󰌌", label: Commons.I18n.t("controlCenter.keyboard"), + on: false, enabled: true, act: root.showKeyboard } + ] + // Live once their backend exists (power profiles, Focus, Night Light, media). + readonly property var later: [ + { glyph: "󰓅", label: Commons.I18n.t("controlCenter.balanced") }, + { glyph: "󰖔", label: Commons.I18n.t("controlCenter.focus") }, + { glyph: "󰽟", label: Commons.I18n.t("controlCenter.night") }, + { glyph: "󰝚", label: Commons.I18n.t("controlCenter.media") } + ] + + // Keyboard: the focused cell, or none until the keyboard is used. + property var focusables: [] + property int focusIndex: -1 + function registerCell(item) { + var list = root.focusables.slice() + if (list.indexOf(item) < 0) list.push(item) + root.focusables = list + } + function focusedCell() { return focusIndex >= 0 && focusIndex < focusables.length ? focusables[focusIndex] : null } + function visibleCells() { return focusables.filter(function(c) { return c && c.visible && c.focusable }) } + function moveFocus(dx, dy) { + var cells = visibleCells() + if (cells.length === 0) return + var current = focusedCell() + if (!current || cells.indexOf(current) < 0) { root.focusIndex = focusables.indexOf(cells[0]); return } + var a = current.mapToItem(card, current.width / 2, current.height / 2) + var best = null, bestScore = 1e9 + for (var i = 0; i < cells.length; i++) { + var c = cells[i] + if (c === current) continue + var b = c.mapToItem(card, c.width / 2, c.height / 2) + var along = dx !== 0 ? (b.x - a.x) * dx : (b.y - a.y) * dy + if (along <= 1) continue + var across = dx !== 0 ? Math.abs(b.y - a.y) : Math.abs(b.x - a.x) + var score = along + across * 2 + if (score < bestScore) { bestScore = score; best = c } + } + if (best) root.focusIndex = focusables.indexOf(best) + } + function stepFocus(delta) { + var cells = visibleCells() + if (cells.length === 0) return + var at = cells.indexOf(focusedCell()) + var next = at < 0 ? (delta > 0 ? 0 : cells.length - 1) : (at + delta + cells.length) % cells.length + root.focusIndex = focusables.indexOf(cells[next]) + } + + // ----------------------------------------------------------- lifecycle + + function open() { + if (!brightnessRead.running) brightnessRead.running = true + if (!autoRead.running) autoRead.running = true + root.focusIndex = -1 + revealOut.stop() + root.opened = true + if (root.mapped && panel.contentRevealed) revealIn.restart() + root.mapped = true + Qt.callLater(function() { keyCatcher.forceActiveFocus() }) + } + function close() { + if (!root.opened) return + root.opened = false + revealIn.stop() + revealOut.restart() + } + function toggle() { root.opened ? root.close() : root.open() } + + NumberAnimation { id: revealIn; target: root; property: "reveal"; to: 1; duration: root.gpu ? Style.duration(160) : 0; easing.type: Easing.OutCubic } + NumberAnimation { + id: revealOut; target: root; property: "reveal"; to: 0 + duration: root.gpu ? Style.duration(110) : 0; easing.type: Easing.InCubic + onFinished: if (!root.opened) root.mapped = false + } + + ShellIpc { + target: "omarchy.controlcenter" + function toggle(): void { root.toggle() } + function open(): void { if (!root.opened) root.open() } + function close(): void { root.close() } + } + + // ------------------------------------------------------------- window + + OverlayWindow { + id: panel + shown: root.mapped + WlrLayershell.namespace: "omarchy-control-center" + + onContentRevealedChanged: if (contentRevealed && root.opened) { + root.reveal = 0 + revealIn.restart() + keyCatcher.forceActiveFocus() + } + + // iPad: the rest of the screen dims, and a tap there closes. Phone: the + // control center is the screen. + Rectangle { + anchors.fill: parent + color: root.phone ? Commons.Color.menu.background : Commons.Color.menu.scrim + opacity: root.reveal + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: root.close() + } + } + + Item { + id: keyCatcher + anchors.fill: parent + focus: true + Keys.onPressed: function(event) { + var cell = root.focusedCell() + switch (event.key) { + case Qt.Key_Escape: root.close(); break + case Qt.Key_Tab: root.stepFocus(1); break + case Qt.Key_Backtab: root.stepFocus(-1); break + case Qt.Key_Up: root.moveFocus(0, -1); break + case Qt.Key_Down: root.moveFocus(0, 1); break + case Qt.Key_Left: + if (cell && cell.adjust) cell.adjust(-0.05); else root.moveFocus(-1, 0); break + case Qt.Key_Right: + if (cell && cell.adjust) cell.adjust(0.05) + else if (cell && cell.page) root.openPage(cell.page) + else root.moveFocus(1, 0); break + case Qt.Key_Return: case Qt.Key_Enter: case Qt.Key_Space: + if (cell && cell.activate) cell.activate(); break + default: return + } + event.accepted = true + } + } + + // A pointer clears the keyboard's highlight. + PointHandler { + onActiveChanged: if (active) root.focusIndex = -1 + } + + Rectangle { + id: card + x: root.phone ? 0 : parent.width - width - Style.gapsOut + y: root.phone ? root.barInset : root.barInset + Style.gapsOut + width: root.phone ? parent.width : root.cardWidth + height: root.phone ? parent.height - root.barInset : content.implicitHeight + root.pad * 2 + color: root.phone ? "transparent" : Commons.Color.popups.background + border.width: root.phone ? 0 : Math.max(1, Style.space(1)) + border.color: Commons.Color.popups.border + radius: Style.cornerRadius + opacity: root.reveal + transform: Translate { y: (1 - root.reveal) * -Style.space(8) } + + MouseArea { anchors.fill: parent } // taps inside never close + + Column { + id: content + x: root.pad + y: root.pad + (root.phone ? Style.space(12) : 0) + width: parent.width - root.pad * 2 + spacing: root.gap + + // Wi-Fi and Bluetooth. + Row { + spacing: root.gap + Tile { + width: (content.width - root.gap) / 2 + glyph: network.icon !== "" ? network.icon : "󰖪" + title: Commons.I18n.t("controlCenter.wifi") + subtitle: root.wifiSubtitle + on: network.wifiEnabled + page: "omarchy.network" + onActivated: root.toggleWifi() + } + Tile { + width: (content.width - root.gap) / 2 + glyph: bluetooth.icon !== "" ? bluetooth.icon : "󰂲" + title: Commons.I18n.t("controlCenter.bluetooth") + subtitle: root.bluetoothSubtitle + on: bluetooth.enabled + available: !!bluetooth.adapter + page: "omarchy.bluetooth" + onActivated: root.toggleBluetooth() + } + } + + // Brightness and volume: one row each on an iPad, side by side as + // tall squares on a phone. + Grid { + columns: root.phone ? 2 : 1 + spacing: root.gap + Slider { + width: root.phone ? (content.width - root.gap) / 2 : content.width + height: root.phone ? Style.space(150) : Style.space(44) + vertical: root.phone + glyph: "󰃞" + value: root.brightness < 0 ? 0 : root.brightness / 100 + available: root.brightness >= 0 + note: root.autoBrightness ? Commons.I18n.t("controlCenter.auto") : "" + onMoved: function(v) { root.setBrightness(v * 100) } + onLongPressed: root.openPage("omarchy.monitor") + } + Slider { + width: root.phone ? (content.width - root.gap) / 2 : content.width + height: root.phone ? Style.space(150) : Style.space(44) + vertical: root.phone + glyph: root.volume <= 0 || (root.sink && root.sink.audio && root.sink.audio.muted) ? "󰝟" : "󰕾" + value: root.volume + available: !!(root.sink && root.sink.audio) + chip: root.outputName + onMoved: function(v) { root.setVolume(v) } + onChipClicked: root.openPage("omarchy.audio") + onLongPressed: root.openPage("omarchy.audio") + } + } + + // The toggles, then the ones still to come. + Grid { + columns: 4 + spacing: root.gap + Repeater { + model: root.toggles + Toggle { + required property var modelData + width: (content.width - root.gap * 3) / 4 + height: root.phone ? width : Style.space(64) + glyph: modelData.glyph + label: modelData.label + on: modelData.on + available: modelData.enabled + onActivated: modelData.act() + } + } + Repeater { + model: root.later + Toggle { + required property var modelData + width: (content.width - root.gap * 3) / 4 + height: root.phone ? width : Style.space(64) + glyph: modelData.glyph + label: modelData.label + available: false + } + } + } + + // Battery line and the session actions (iPad: here; phone: at the foot). + Item { + id: footer + width: content.width + height: root.touchMin + visible: !root.phone + FooterParts { anchors.fill: parent } + } + } + + Item { + visible: root.phone + x: root.pad + width: parent.width - root.pad * 2 + height: root.touchMin + anchors.bottom: parent.bottom + anchors.bottomMargin: Style.space(24) + FooterParts { anchors.fill: parent } + } + } + } + + // ----------------------------------------------------------- components + + component Cell: Rectangle { + id: cell + property bool on: false + property bool available: true + property string page: "" + property bool focusable: available + readonly property bool focused: root.focusables[root.focusIndex] === cell + property bool pressed: false + signal activated() + function activate() { if (cell.available) cell.activated() } + Component.onCompleted: root.registerCell(cell) + radius: Style.cornerRadius + color: !available ? "transparent" + : (pressed ? Style.pressedFillFor(root.text, Commons.Color.accent) + : (on ? root.onFill : Style.controlFill(false, false, root.text, Commons.Color.accent))) + border.width: Math.max(1, Style.space(1)) + border.color: focused ? Commons.Color.accent : (on && available ? root.onFill : Style.normalBorderColor) + opacity: available ? 1 : 0.45 + } + + component Tile: Cell { + id: tile + property string glyph: "" + property string title: "" + property string subtitle: "" + height: root.phone ? Style.space(64) : Style.space(56) + readonly property color ink: on && available ? root.onText : root.text + Row { + x: Style.space(12) + anchors.verticalCenter: parent.verticalCenter + spacing: Style.space(10) + Text { + anchors.verticalCenter: parent.verticalCenter + text: tile.glyph + color: tile.ink + font.family: Style.font.family + font.pixelSize: Style.font.title + } + Column { + anchors.verticalCenter: parent.verticalCenter + width: tile.width - Style.space(12) * 2 - Style.space(10) - Style.font.title - (tile.page !== "" && !root.phone ? Style.space(20) : 0) + Text { + width: parent.width + textFormat: Text.PlainText + text: tile.title + color: tile.ink + font.family: Style.font.family + font.pixelSize: Style.font.subtitle + font.bold: true + elide: Text.ElideRight + } + Text { + width: parent.width + textFormat: Text.PlainText + text: tile.subtitle + color: tile.ink + opacity: 0.75 + font.family: Style.font.family + font.pixelSize: Style.font.caption + elide: Text.ElideRight + } + } + } + // Tap toggles; the chevron, a long press or a right click opens the page. + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onPressed: tile.pressed = true + onReleased: tile.pressed = false + onCanceled: tile.pressed = false + onPressAndHold: { tile.pressed = false; if (tile.page) root.openPage(tile.page) } + onClicked: function(mouse) { + if (mouse.button === Qt.RightButton) { if (tile.page) root.openPage(tile.page) } + else tile.activate() + } + } + Item { + visible: tile.page !== "" && !root.phone + anchors.right: parent.right + width: Style.space(32) + height: parent.height + Text { + anchors.centerIn: parent + text: "󰅂" + color: tile.ink + font.family: Style.font.family + font.pixelSize: Style.font.body + } + MouseArea { anchors.fill: parent; onClicked: root.openPage(tile.page) } + } + } + + component Toggle: Cell { + id: toggle + property string glyph: "" + property string label: "" + readonly property color ink: on && available ? root.onText : root.text + Column { + anchors.centerIn: parent + spacing: Style.space(4) + Text { + anchors.horizontalCenter: parent.horizontalCenter + text: toggle.glyph + color: toggle.ink + font.family: Style.font.family + font.pixelSize: Style.font.iconLarge + } + Text { + anchors.horizontalCenter: parent.horizontalCenter + textFormat: Text.PlainText + text: toggle.label + color: toggle.ink + font.family: Style.font.family + font.pixelSize: Style.font.caption + } + } + MouseArea { + anchors.fill: parent + enabled: toggle.available + onPressed: toggle.pressed = true + onReleased: toggle.pressed = false + onCanceled: toggle.pressed = false + onClicked: toggle.activate() + } + } + + // A level you drag: the filled part is the value. Horizontal on an iPad, + // vertical (bottom up) on a phone. A long press opens the module's page. + component Slider: Cell { + id: slider + property bool vertical: false + property string glyph: "" + property real value: 0 + property string note: "" + property string chip: "" + signal moved(real value) + signal chipClicked() + signal longPressed() + function adjust(delta) { if (slider.available) slider.moved(Math.max(0, Math.min(1, slider.value + delta))) } + color: Style.controlFill(false, false, root.text, Commons.Color.accent) + clip: true + + Rectangle { + x: 0 + y: slider.vertical ? parent.height * (1 - slider.value) : 0 + width: slider.vertical ? parent.width : parent.width * slider.value + height: slider.vertical ? parent.height * slider.value : parent.height + color: root.text + opacity: 0.85 + } + Text { + x: slider.vertical ? (parent.width - width) / 2 : Style.space(12) + y: slider.vertical ? parent.height - height - Style.space(12) : (parent.height - height) / 2 + text: slider.glyph + color: slider.value > 0.08 ? Commons.Color.background : root.text + font.family: Style.font.family + font.pixelSize: Style.font.title + } + Text { + visible: slider.note !== "" + x: slider.vertical ? Style.space(12) : parent.width - width - Style.space(12) + y: slider.vertical ? Style.space(12) : (parent.height - height) / 2 + textFormat: Text.PlainText + text: slider.note + color: root.text + opacity: 0.7 + font.family: Style.font.family + font.pixelSize: Style.font.caption + } + MouseArea { + id: drag + anchors.fill: parent + enabled: slider.available + preventStealing: true + function valueAt(mouse) { + return slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width + } + onPressed: function(mouse) { slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) } + onPositionChanged: function(mouse) { if (pressed) slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) } + onPressAndHold: slider.longPressed() + } + Rectangle { + id: chipBox + visible: slider.chip !== "" + x: slider.vertical ? Style.space(10) : parent.width - width - Style.space(10) + y: slider.vertical ? Style.space(10) : (parent.height - height) / 2 + width: Math.min(chipRow.implicitWidth + Style.space(16), parent.width - Style.space(20)) + height: Style.space(26) + color: Commons.Color.popups.background + border.width: Math.max(1, Style.space(1)) + border.color: Style.normalBorderColor + radius: Style.cornerRadius + Row { + id: chipRow + anchors.centerIn: parent + spacing: Style.space(6) + Text { + width: Math.min(implicitWidth, chipBox.parent.width - Style.space(48)) + textFormat: Text.PlainText + text: slider.chip + color: root.text + font.family: Style.font.family + font.pixelSize: Style.font.caption + font.bold: true + elide: Text.ElideRight + } + Text { + text: "󰅂" + color: root.text + font.family: Style.font.family + font.pixelSize: Style.font.caption + } + } + MouseArea { + anchors.fill: parent + anchors.margins: -Style.space(8) + onClicked: slider.chipClicked() + } + } + } + + component FooterParts: Item { + // Battery line: opens the battery page; the power button the session. + Cell { + id: batteryCell + visible: root.batteryLine !== "" + page: "omarchy.power" + color: "transparent" + border.width: focused ? Math.max(1, Style.space(1)) : 0 + width: batteryRow.implicitWidth + Style.space(16) + height: parent.height + onActivated: root.openPage("omarchy.power") + Row { + id: batteryRow + x: Style.space(8) + anchors.verticalCenter: parent.verticalCenter + spacing: Style.space(6) + Text { anchors.verticalCenter: parent.verticalCenter; text: battery.icon; color: root.text; font.family: Style.font.family; font.pixelSize: Style.font.body } + Text { anchors.verticalCenter: parent.verticalCenter; textFormat: Text.PlainText; text: root.batteryLine; color: root.text; font.family: Style.font.family; font.pixelSize: Style.font.caption } + Text { anchors.verticalCenter: parent.verticalCenter; text: "󰅂"; color: root.text; opacity: 0.6; font.family: Style.font.family; font.pixelSize: Style.font.caption } + } + MouseArea { anchors.fill: parent; onClicked: batteryCell.activate() } + } + Cell { + id: powerCell + anchors.right: parent.right + width: root.touchMin + height: parent.height + color: "transparent" + border.width: focused ? Math.max(1, Style.space(1)) : 0 + onActivated: root.sessionActions() + Text { + anchors.centerIn: parent + text: "󰐥" + color: Commons.Color.urgent + font.family: Style.font.family + font.pixelSize: Style.font.title + } + MouseArea { anchors.fill: parent; onClicked: powerCell.activate() } + } + } +} diff --git a/desktop/shell/shell/shell.qml b/desktop/shell/shell/shell.qml index b1e5848d..275aafc4 100644 --- a/desktop/shell/shell/shell.qml +++ b/desktop/shell/shell/shell.qml @@ -10,6 +10,7 @@ import qs.Commons as Commons import "plugins/bar" import "launcher" +import "controlcenter" import "services" import "services/AuthServiceStore.js" as AuthServiceStore @@ -28,6 +29,8 @@ ShellRoot { // (`omarchy-shell omarchy.dock apps`), so Home, Super, Super+Space and the // bar's logo open it, without mapping Hyprland's dock. Launcher { id: appGrid; shell: shell; appLibrary: shell.appLibrary } + // Orchard: the control center (`omarchy-shell omarchy.controlcenter toggle`). + ControlCenter { shell: shell } ShellIpc { target: "omarchy.dock" function apps(): void { appGrid.toggle() } diff --git a/docs/upstream.md b/docs/upstream.md index b4c3df24..216cbf77 100644 --- a/docs/upstream.md +++ b/docs/upstream.md @@ -84,8 +84,8 @@ charger PM readiness. **Translations.** `default/i18n/en/cli.json` holds only the keys of the commands shipped here; `shell.json` adds the auto-brightness and captive-portal keys. -**Our own files** (no upstream counterpart): the status cluster -(`shell/plugins/status/`), the launcher +**Our own files** (no upstream counterpart): the control center +(`shell/controlcenter/`), the status cluster (`shell/plugins/status/`), the launcher (`shell/launcher/`, `bin/omarchy-launcher-recent-files`, `bin/omarchy-launcher-backdrop`), the labwc config, theme renderer and window buttons (`labwc-*`, `render-labwc-*.py`), the on-screen keyboard From db779c908c146b24a1630655de8a6f3a8bab85fa Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 00:56:35 +0800 Subject: [PATCH 02/39] Control center: Super+Ctrl+1 for existing users too A user's labwc rc.xml is theirs, so a new binding reaches it only through a migration: it goes in before the launcher's Super+Space. Assisted-by: LLM --- desktop/shell/migrations/1795107370.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 desktop/shell/migrations/1795107370.sh diff --git a/desktop/shell/migrations/1795107370.sh b/desktop/shell/migrations/1795107370.sh new file mode 100644 index 00000000..ed33bb03 --- /dev/null +++ b/desktop/shell/migrations/1795107370.sh @@ -0,0 +1,9 @@ +echo "Super+Ctrl+1 opens the control center" + +# A new user's rc.xml has the binding; an existing one gets it before the +# launcher's (Super+Space), unless the key is bound already. +rc="$HOME/.config/labwc/rc.xml" +if [[ -f $rc ]] && ! grep -q 'key="W-C-1"' "$rc" && grep -q '^ ' "$rc"; then + sed '0,/^ /s## \n \n \n #' "$rc" > "$rc.new" + mv -- "$rc.new" "$rc" +fi From 802ba55f23bd604b0a62acc0afca5b40e21dc401 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:03:05 +0800 Subject: [PATCH 03/39] Control center: pull it down from the top edge's right third A finger pulling down from the right third of the bar brings the control center down with it; pushed up, it goes back the same way. It follows the finger (past fully open only against a little resistance), and let go, a spring takes over at the finger's speed: a flick carries through, a slow release eases in, and it lands with a slight overshoot. The card fades in over the first part of the way and the screen dims with the pull. Opening and closing from the keyboard use the same spring from rest. The bar takes the touch only once it moves vertically, so a tap still reaches its icons; the touch stays the bar's while the finger moves down the screen, so no compositor change is needed. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 107 +++++++++++++++--- desktop/shell/shell/plugins/bar/Bar.qml | 27 +++++ desktop/shell/shell/shell.qml | 4 +- 3 files changed, 122 insertions(+), 16 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 01307805..a62e0d76 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -201,29 +201,87 @@ Item { // ----------------------------------------------------------- lifecycle - function open() { + function prepare() { if (!brightnessRead.running) brightnessRead.running = true if (!autoRead.running) autoRead.running = true root.focusIndex = -1 - revealOut.stop() + } + + function open() { + root.prepare() root.opened = true - if (root.mapped && panel.contentRevealed) revealIn.restart() root.mapped = true + if (panel.contentRevealed) root.settle(1, 0) Qt.callLater(function() { keyCatcher.forceActiveFocus() }) } function close() { if (!root.opened) return root.opened = false - revealIn.stop() - revealOut.restart() + root.settle(0, 0) } function toggle() { root.opened ? root.close() : root.open() } - NumberAnimation { id: revealIn; target: root; property: "reveal"; to: 1; duration: root.gpu ? Style.duration(160) : 0; easing.type: Easing.OutCubic } - NumberAnimation { - id: revealOut; target: root; property: "reveal"; to: 0 - duration: root.gpu ? Style.duration(110) : 0; easing.type: Easing.InCubic - onFinished: if (!root.opened) root.mapped = false + // A finger pulls it down from the top edge (the bar), or up to put it + // away: it follows the finger, past its place only against resistance. + // Let go, it keeps the finger's speed and a spring carries it to open or + // back, by how far it came and how fast it was moving. + property bool pulling: false + readonly property real pullSpan: Math.max(1, card.y + card.height) + property real pullFrom: 0 + + function beginPull() { + spring.running = false + if (!root.opened) { + root.prepare() + root.reveal = 0 + root.mapped = true + } + root.pullFrom = root.reveal + root.pulling = true + } + function pullTo(distance) { + if (!root.pulling) return + var r = root.pullFrom + distance / root.pullSpan + // Past fully open it gives a little, ever less. + if (r > 1) r = 1 + (1 - 1 / (1 + (r - 1) * 2)) * 0.08 + root.reveal = Math.max(0, r) + } + function endPull(velocity) { + if (!root.pulling) return + root.pulling = false + var flick = Style.space(400) + var keep = velocity > flick || (velocity > -flick && root.reveal > 0.4) + root.opened = keep + root.settle(keep ? 1 : 0, velocity / root.pullSpan) + if (keep) Qt.callLater(function() { keyCatcher.forceActiveFocus() }) + } + + // The spring: reveal moves to its target from the speed it has, slightly + // underdamped on the way in (it lands, overshoots a touch, settles) and + // critically damped on the way out (it simply goes). + property real springTarget: 0 + property real springVelocity: 0 + function settle(target, velocity) { + root.springTarget = target + root.springVelocity = velocity + spring.running = true + } + FrameAnimation { + id: spring + onTriggered: { + var dt = Math.min(frameTime, 1 / 30) + var stiffness = 260 + var damping = 2 * Math.sqrt(stiffness) * (root.springTarget > 0 ? 0.78 : 1.0) + var force = -stiffness * (root.reveal - root.springTarget) - damping * root.springVelocity + root.springVelocity += force * dt + root.reveal += root.springVelocity * dt + if (Math.abs(root.reveal - root.springTarget) < 0.002 && Math.abs(root.springVelocity) < 0.02) { + root.reveal = root.springTarget + root.springVelocity = 0 + running = false + if (!root.opened) root.mapped = false + } + } } ShellIpc { @@ -240,9 +298,9 @@ Item { shown: root.mapped WlrLayershell.namespace: "omarchy-control-center" - onContentRevealedChanged: if (contentRevealed && root.opened) { + onContentRevealedChanged: if (contentRevealed && root.opened && !root.pulling) { root.reveal = 0 - revealIn.restart() + root.settle(1, 0) keyCatcher.forceActiveFocus() } @@ -251,7 +309,7 @@ Item { Rectangle { anchors.fill: parent color: root.phone ? Commons.Color.menu.background : Commons.Color.menu.scrim - opacity: root.reveal + opacity: Math.max(0, Math.min(1, root.reveal)) MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton @@ -290,6 +348,23 @@ Item { onActiveChanged: if (active) root.focusIndex = -1 } + // Pushed up by a finger, it follows and goes away. Above the card, so it + // sees every touch; it takes one only once it moves up or down, and a + // slider keeps its own drags. + Item { + anchors.fill: parent + z: 10 + DragHandler { + target: null + xAxis.enabled: false + acceptedDevices: PointerDevice.TouchScreen + grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType + enabled: root.opened || root.pulling + onActiveChanged: active ? root.beginPull() : root.endPull(centroid.velocity.y) + onTranslationChanged: if (active) root.pullTo(translation.y) + } + } + Rectangle { id: card x: root.phone ? 0 : parent.width - width - Style.gapsOut @@ -300,8 +375,10 @@ Item { border.width: root.phone ? 0 : Math.max(1, Style.space(1)) border.color: Commons.Color.popups.border radius: Style.cornerRadius - opacity: root.reveal - transform: Translate { y: (1 - root.reveal) * -Style.space(8) } + // It slides down from above the screen's top edge, as the finger + // pulled it, and back up; it fades in over the first part of the way. + transform: Translate { y: -(1 - root.reveal) * root.pullSpan } + opacity: Math.max(0, Math.min(1, root.reveal * 2.5)) MouseArea { anchors.fill: parent } // taps inside never close diff --git a/desktop/shell/shell/plugins/bar/Bar.qml b/desktop/shell/shell/plugins/bar/Bar.qml index 16ec518c..ab1470e9 100644 --- a/desktop/shell/shell/plugins/bar/Bar.qml +++ b/desktop/shell/shell/plugins/bar/Bar.qml @@ -1852,6 +1852,33 @@ Item { anchors.fill: parent sourceComponent: root.vertical ? verticalBar : horizontalBar } + + // Orchard: a finger pulling down from the top edge's right third pulls + // the control center down with it (SHELL-SPEC, step 2); the left two + // thirds will be the notification center's. Only a vertical drag takes + // the touch from the icons under it: a tap still reaches them. The + // touch stays this surface's while the finger moves down the screen. + Item { + x: parent.width * 2 / 3 + width: parent.width - x + height: parent.height + visible: root.position === "top" && !!root.shell && !!root.shell.controlCenter + + DragHandler { + id: pull + target: null + xAxis.enabled: false + acceptedDevices: PointerDevice.TouchScreen + grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType + readonly property var center: root.shell ? root.shell.controlCenter : null + onActiveChanged: { + if (!center) return + if (active) center.beginPull() + else center.endPull(centroid.velocity.y) + } + onTranslationChanged: if (active && center) center.pullTo(translation.y) + } + } } PopupWindow { diff --git a/desktop/shell/shell/shell.qml b/desktop/shell/shell/shell.qml index 275aafc4..64be7023 100644 --- a/desktop/shell/shell/shell.qml +++ b/desktop/shell/shell/shell.qml @@ -30,7 +30,9 @@ ShellRoot { // bar's logo open it, without mapping Hyprland's dock. Launcher { id: appGrid; shell: shell; appLibrary: shell.appLibrary } // Orchard: the control center (`omarchy-shell omarchy.controlcenter toggle`). - ControlCenter { shell: shell } + ControlCenter { id: controlCenter; shell: shell } + // The bar pulls it down from the top edge's right third (Bar.qml). + readonly property var controlCenter: controlCenter ShellIpc { target: "omarchy.dock" function apps(): void { appGrid.toggle() } From b8d5ed1b7863bea1b96d5ff80f8f94685d9e2511 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:05:44 +0800 Subject: [PATCH 04/39] Control center: it grows out of its corner as it comes Scale from 86 % with the pull's progress, anchored where it is pulled from (top right on an iPad, top on a phone), a shorter slide, and the fade a little longer. Assisted-by: LLM --- .../shell/shell/controlcenter/ControlCenter.qml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index a62e0d76..b9470a8e 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -375,10 +375,19 @@ Item { border.width: root.phone ? 0 : Math.max(1, Style.space(1)) border.color: Commons.Color.popups.border radius: Style.cornerRadius - // It slides down from above the screen's top edge, as the finger - // pulled it, and back up; it fades in over the first part of the way. - transform: Translate { y: -(1 - root.reveal) * root.pullSpan } - opacity: Math.max(0, Math.min(1, root.reveal * 2.5)) + // It grows out of the corner it is pulled from (the top right on an + // iPad, the top on a phone) as it comes down and fades in, all with + // the pull's progress; the spring's overshoot swells it a hair. + transform: [ + Scale { + origin.x: root.phone ? card.width / 2 : card.width + origin.y: 0 + xScale: 0.86 + 0.14 * root.reveal + yScale: xScale + }, + Translate { y: -(1 - root.reveal) * root.pullSpan * 0.4 } + ] + opacity: Math.max(0, Math.min(1, root.reveal * 2)) MouseArea { anchors.fill: parent } // taps inside never close From 6e83d1c1d4f643ec1e92bc4472867c1fe4f3159a Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:06:31 +0800 Subject: [PATCH 05/39] Control center: its bottom edge stays under the finger The slide follows from the scale, so the scaled card's bottom is where the finger is all the way down; at full reveal it sits in place. Assisted-by: LLM --- .../shell/shell/controlcenter/ControlCenter.qml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index b9470a8e..b2870de7 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -375,17 +375,19 @@ Item { border.width: root.phone ? 0 : Math.max(1, Style.space(1)) border.color: Commons.Color.popups.border radius: Style.cornerRadius - // It grows out of the corner it is pulled from (the top right on an - // iPad, the top on a phone) as it comes down and fades in, all with - // the pull's progress; the spring's overshoot swells it a hair. + // Its bottom edge is where the finger is: reveal is the finger's way + // down as a share of the card's bottom. On the way it grows out of the + // corner it is pulled from (top right on an iPad, top on a phone) and + // fades in; the slide is what keeps the scaled bottom under the finger. + readonly property real grow: 0.86 + 0.14 * root.reveal transform: [ Scale { origin.x: root.phone ? card.width / 2 : card.width origin.y: 0 - xScale: 0.86 + 0.14 * root.reveal - yScale: xScale + xScale: card.grow + yScale: card.grow }, - Translate { y: -(1 - root.reveal) * root.pullSpan * 0.4 } + Translate { y: root.reveal * root.pullSpan - card.y - card.height * card.grow } ] opacity: Math.max(0, Math.min(1, root.reveal * 2)) From 66e965c3a848018b6c296b7c51e531fff8a817b5 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:07:46 +0800 Subject: [PATCH 06/39] Control center: it grows out of its own top centre Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index b2870de7..e6ae1450 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -376,13 +376,12 @@ Item { border.color: Commons.Color.popups.border radius: Style.cornerRadius // Its bottom edge is where the finger is: reveal is the finger's way - // down as a share of the card's bottom. On the way it grows out of the - // corner it is pulled from (top right on an iPad, top on a phone) and - // fades in; the slide is what keeps the scaled bottom under the finger. + // down as a share of the card's bottom. On the way it grows out of its + // own top centre and fades in; the slide is what keeps the scaled bottom under the finger. readonly property real grow: 0.86 + 0.14 * root.reveal transform: [ Scale { - origin.x: root.phone ? card.width / 2 : card.width + origin.x: card.width / 2 origin.y: 0 xScale: card.grow yScale: card.grow From 9e2d26534bea3dd5fb7460ca1f2b419f8eb6b533 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:10:52 +0800 Subject: [PATCH 07/39] Control center: solid within the first quarter of the pull Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index e6ae1450..b9e5454d 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -388,7 +388,8 @@ Item { }, Translate { y: root.reveal * root.pullSpan - card.y - card.height * card.grow } ] - opacity: Math.max(0, Math.min(1, root.reveal * 2)) + // Solid within the first quarter of the way, most of it at once. + opacity: 1 - Math.pow(1 - Math.max(0, Math.min(1, root.reveal / 0.25)), 2) MouseArea { anchors.fill: parent } // taps inside never close From 2828f1aa4f14664b7c5647799a4c83839902203f Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:11:49 +0800 Subject: [PATCH 08/39] Control center: it fades out on its own on the way out Let go to close, the card fades in 120 ms while the spring carries it up; while a finger holds it, opacity follows the finger as before. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index b9e5454d..8a4ea6ea 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -231,6 +231,8 @@ Item { function beginPull() { spring.running = false + leaveFade.stop() + root.leave = 1 if (!root.opened) { root.prepare() root.reveal = 0 @@ -265,6 +267,20 @@ Item { root.springTarget = target root.springVelocity = velocity spring.running = true + if (target > 0) { leaveFade.stop(); root.leave = 1 } + else leaveFade.restart() + } + + // The card's own fade on the way out (1 while it stays). + property real leave: 1 + NumberAnimation { + id: leaveFade + target: root + property: "leave" + from: 1 + to: 0 + duration: Style.duration(120) + easing.type: Easing.OutQuad } FrameAnimation { id: spring @@ -388,8 +404,9 @@ Item { }, Translate { y: root.reveal * root.pullSpan - card.y - card.height * card.grow } ] - // Solid within the first quarter of the way, most of it at once. - opacity: 1 - Math.pow(1 - Math.max(0, Math.min(1, root.reveal / 0.25)), 2) + // Solid within the first quarter of the way, most of it at once; + // on the way out it fades on its own, quicker than it moves. + opacity: root.leave * (1 - Math.pow(1 - Math.max(0, Math.min(1, root.reveal / 0.25)), 2)) MouseArea { anchors.fill: parent } // taps inside never close From c1243a973d86dbb022c2fcfa360f1e2312f9c97a Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:13:13 +0800 Subject: [PATCH 09/39] Control center: going out, gone as its bottom reaches the status bar The way out fades with position instead of time: full when open, nothing once the card's bottom edge is at the bar, whether a finger pushes it up or it was let go to close. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 8a4ea6ea..592e0bf5 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -231,8 +231,6 @@ Item { function beginPull() { spring.running = false - leaveFade.stop() - root.leave = 1 if (!root.opened) { root.prepare() root.reveal = 0 @@ -267,21 +265,10 @@ Item { root.springTarget = target root.springVelocity = velocity spring.running = true - if (target > 0) { leaveFade.stop(); root.leave = 1 } - else leaveFade.restart() } - // The card's own fade on the way out (1 while it stays). - property real leave: 1 - NumberAnimation { - id: leaveFade - target: root - property: "leave" - from: 1 - to: 0 - duration: Style.duration(120) - easing.type: Easing.OutQuad - } + // Going out: closing, or a finger pushing it up from open. + readonly property bool leaving: root.pulling ? root.pullFrom > 0.5 : !root.opened FrameAnimation { id: spring onTriggered: { @@ -404,9 +391,13 @@ Item { }, Translate { y: root.reveal * root.pullSpan - card.y - card.height * card.grow } ] - // Solid within the first quarter of the way, most of it at once; - // on the way out it fades on its own, quicker than it moves. - opacity: root.leave * (1 - Math.pow(1 - Math.max(0, Math.min(1, root.reveal / 0.25)), 2)) + // Coming in: solid within the first quarter of the way, most of it at + // once. Going out (let go to close, or pushed up from open): it fades + // with its way up, gone as its bottom edge reaches the status bar. + readonly property real barShare: Math.min(0.9, root.barInset / root.pullSpan) + opacity: root.leaving + ? Math.max(0, Math.min(1, (root.reveal - barShare) / (1 - barShare))) + : 1 - Math.pow(1 - Math.max(0, Math.min(1, root.reveal / 0.25)), 2) MouseArea { anchors.fill: parent } // taps inside never close From 0d4a6f6c5ef2bdf31295e65fae67474155624a5a Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:13:34 +0800 Subject: [PATCH 10/39] Control center: a pull that never opened falls back with its own fade Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 592e0bf5..6657788e 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -216,6 +216,7 @@ Item { } function close() { if (!root.opened) return + root.closingFromOpen = true root.opened = false root.settle(0, 0) } @@ -251,6 +252,7 @@ Item { root.pulling = false var flick = Style.space(400) var keep = velocity > flick || (velocity > -flick && root.reveal > 0.4) + root.closingFromOpen = !keep && root.pullFrom > 0.5 root.opened = keep root.settle(keep ? 1 : 0, velocity / root.pullSpan) if (keep) Qt.callLater(function() { keyCatcher.forceActiveFocus() }) @@ -267,8 +269,10 @@ Item { spring.running = true } - // Going out: closing, or a finger pushing it up from open. - readonly property bool leaving: root.pulling ? root.pullFrom > 0.5 : !root.opened + // Going out: closing from open, or a finger pushing it up from open. A + // pull let go before it opened falls back with the coming-in fade. + property bool closingFromOpen: false + readonly property bool leaving: root.pulling ? root.pullFrom > 0.5 : (!root.opened && root.closingFromOpen) FrameAnimation { id: spring onTriggered: { From c24e7faa3ef3238f64b14becf48eb2372210ee76 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:14:22 +0800 Subject: [PATCH 11/39] Control center: a softer spring on the way out Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 6657788e..5b1f7e42 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -277,7 +277,8 @@ Item { id: spring onTriggered: { var dt = Math.min(frameTime, 1 / 30) - var stiffness = 260 + // Softer going out: it is seen to travel up rather than vanish. + var stiffness = root.springTarget > 0 ? 260 : 140 var damping = 2 * Math.sqrt(stiffness) * (root.springTarget > 0 ? 0.78 : 1.0) var force = -stiffness * (root.reveal - root.springTarget) - damping * root.springVelocity root.springVelocity += force * dt From 7d5d71e1ae37f4591f2eaff59566de8cae1971e9 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:14:58 +0800 Subject: [PATCH 12/39] Control center: closing spring between the two Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 5b1f7e42..5411c992 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -278,7 +278,7 @@ Item { onTriggered: { var dt = Math.min(frameTime, 1 / 30) // Softer going out: it is seen to travel up rather than vanish. - var stiffness = root.springTarget > 0 ? 260 : 140 + var stiffness = root.springTarget > 0 ? 260 : 195 var damping = 2 * Math.sqrt(stiffness) * (root.springTarget > 0 ? 0.78 : 1.0) var force = -stiffness * (root.reveal - root.springTarget) - damping * root.springVelocity root.springVelocity += force * dt From 99c12c152312cfe03f97fc805306fa569e641917 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:16:45 +0800 Subject: [PATCH 13/39] Control center: Home closes it A single press closes it and opens nothing else; a double press closes it and opens the overview. The control center keeps a note in the runtime directory while open, as the overview does, for the Home button to read. Assisted-by: LLM --- desktop/shell/bin/omarchy-home-button | 9 +++++++++ desktop/shell/shell/controlcenter/ControlCenter.qml | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/desktop/shell/bin/omarchy-home-button b/desktop/shell/bin/omarchy-home-button index 63b9030b..ef621de9 100755 --- a/desktop/shell/bin/omarchy-home-button +++ b/desktop/shell/bin/omarchy-home-button @@ -39,6 +39,14 @@ press_taken() { [[ $answer == combo || $answer == wake ]] } +# The control center goes away at once. A single press then opens nothing +# else; a second one still opens the overview. +control_center= +if [[ -e $runtime/omarchy-control-center-open ]]; then + control_center=1 + omarchy-shell omarchy.controlcenter close >/dev/null 2>&1 & +fi + # In the overview Home goes back to the desktop (omarchy-overview-changed # keeps the note). labwc leaves Home to this script even then, so that # Home + Power can take a screenshot of the overview. @@ -75,4 +83,5 @@ fi # A second press has taken the stamp; an older, slower one may have left its own. [[ $(cat "$stamp" 2>/dev/null) == "$now" ]] || exit 0 rm -f "$stamp" "$answer_file" +[[ -z $control_center ]] || exit 0 exec omarchy-shell omarchy.dock apps diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 5411c992..df2e7bee 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -292,6 +292,10 @@ Item { } } + // While open, a note for the Home button (omarchy-home-button closes it). + readonly property string openNote: (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/omarchy-control-center-open" + onOpenedChanged: Quickshell.execDetached(opened ? ["touch", openNote] : ["rm", "-f", openNote]) + ShellIpc { target: "omarchy.controlcenter" function toggle(): void { root.toggle() } From 72d8ba8301310b730844f945abd13697a05f7471 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:25:05 +0800 Subject: [PATCH 14/39] Control center: dragging a slider is never a long press A drag held past the long-press time opened the Display (or Audio) panel; a long press is now only a finger held still. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index df2e7bee..67ae017c 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -702,9 +702,21 @@ Item { function valueAt(mouse) { return slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width } - onPressed: function(mouse) { slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) } - onPositionChanged: function(mouse) { if (pressed) slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) } - onPressAndHold: slider.longPressed() + // A long press is a finger held still: once it moved, it is a drag, + // however long it lasts. + property point pressedAt + property bool moving: false + onPressed: function(mouse) { + pressedAt = Qt.point(mouse.x, mouse.y) + moving = false + slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) + } + onPositionChanged: function(mouse) { + if (!pressed) return + if (Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) > Style.space(6)) moving = true + slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) + } + onPressAndHold: if (!moving) slider.longPressed() } Rectangle { id: chipBox From 9e8bc4bee143a8d9e2b1c9ef683ec126ccf2c37b Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:31:04 +0800 Subject: [PATCH 15/39] Control center: sliders move with the finger, not to it As on iOS, a slider's level moves with the finger from wherever it lands; a touch alone changes nothing, so a tap or the long press that opens the page leaves the level as it is. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 67ae017c..c73e6c32 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -699,23 +699,27 @@ Item { anchors.fill: parent enabled: slider.available preventStealing: true - function valueAt(mouse) { - return slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width - } - // A long press is a finger held still: once it moved, it is a drag, - // however long it lasts. + // As on iOS: the level moves with the finger from wherever it lands, + // never to where it lands. A touch alone changes nothing, so a tap or + // a long press (the page) leaves the level as it is. property point pressedAt + property real startValue: 0 property bool moving: false + function along(mouse) { + return slider.vertical ? (pressedAt.y - mouse.y) / slider.height : (mouse.x - pressedAt.x) / slider.width + } onPressed: function(mouse) { pressedAt = Qt.point(mouse.x, mouse.y) + startValue = slider.value moving = false - slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) } onPositionChanged: function(mouse) { if (!pressed) return - if (Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) > Style.space(6)) moving = true - slider.moved(Math.max(0, Math.min(1, valueAt(mouse)))) + if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(6)) return + moving = true + slider.moved(Math.max(0, Math.min(1, startValue + along(mouse)))) } + // A long press is a finger held still: once it moved, it is a drag. onPressAndHold: if (!moving) slider.longPressed() } Rectangle { From 5d05c46d14035190411743f5ca9648b722d292ac Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:31:29 +0800 Subject: [PATCH 16/39] Control center: a long press on a slider never moves it Once the long press fired (the page opens), the touch is used up: nothing after it moves the level, and a wobble below 10 points is no drag. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index c73e6c32..1c0a193d 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -705,6 +705,8 @@ Item { property point pressedAt property real startValue: 0 property bool moving: false + // A long press uses the touch up: nothing after it moves the level. + property bool held: false function along(mouse) { return slider.vertical ? (pressedAt.y - mouse.y) / slider.height : (mouse.x - pressedAt.x) / slider.width } @@ -712,15 +714,16 @@ Item { pressedAt = Qt.point(mouse.x, mouse.y) startValue = slider.value moving = false + held = false } onPositionChanged: function(mouse) { - if (!pressed) return - if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(6)) return + if (!pressed || held) return + if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(10)) return moving = true slider.moved(Math.max(0, Math.min(1, startValue + along(mouse)))) } // A long press is a finger held still: once it moved, it is a drag. - onPressAndHold: if (!moving) slider.longPressed() + onPressAndHold: if (!moving) { held = true; slider.longPressed() } } Rectangle { id: chipBox From 78bdbb35980c14ddd48122a7757e0ae624211045 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:33:23 +0800 Subject: [PATCH 17/39] Control center: a slider goes where the finger is; a long press is caught Back to absolute levels: a tap puts it where it was tapped (when the finger lifts), a drag follows the finger from its first move. Only a long press, which opens the page, changes nothing. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 1c0a193d..5352dca7 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -699,20 +699,18 @@ Item { anchors.fill: parent enabled: slider.available preventStealing: true - // As on iOS: the level moves with the finger from wherever it lands, - // never to where it lands. A touch alone changes nothing, so a tap or - // a long press (the page) leaves the level as it is. + // The level goes where the finger is: on a tap when it lifts, on a + // drag as soon as it moves and from then on. A long press (the page) + // is caught instead and changes nothing, so nothing happens on the + // touch itself before it is known which of the three it is. property point pressedAt - property real startValue: 0 property bool moving: false - // A long press uses the touch up: nothing after it moves the level. property bool held: false - function along(mouse) { - return slider.vertical ? (pressedAt.y - mouse.y) / slider.height : (mouse.x - pressedAt.x) / slider.width + function valueAt(mouse) { + return Math.max(0, Math.min(1, slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width)) } onPressed: function(mouse) { pressedAt = Qt.point(mouse.x, mouse.y) - startValue = slider.value moving = false held = false } @@ -720,9 +718,9 @@ Item { if (!pressed || held) return if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(10)) return moving = true - slider.moved(Math.max(0, Math.min(1, startValue + along(mouse)))) + slider.moved(valueAt(mouse)) } - // A long press is a finger held still: once it moved, it is a drag. + onReleased: function(mouse) { if (!moving && !held) slider.moved(valueAt(mouse)) } onPressAndHold: if (!moving) { held = true; slider.longPressed() } } Rectangle { From f8a1b8f4bba6c4a58b58fdaaf12b04423c865108 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:35:29 +0800 Subject: [PATCH 18/39] Control center: a held slider shows it is held Still for a moment (neither a tap nor a drag), the slider takes the pressed tint and shrinks a little until the finger lifts or moves. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 5352dca7..47ea8fbd 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -666,6 +666,8 @@ Item { function adjust(delta) { if (slider.available) slider.moved(Math.max(0, Math.min(1, slider.value + delta))) } color: Style.controlFill(false, false, root.text, Commons.Color.accent) clip: true + scale: drag.holding ? 0.96 : 1 + Behavior on scale { NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic } } Rectangle { x: 0 @@ -675,6 +677,13 @@ Item { color: root.text opacity: 0.85 } + // The pressed tint while held. + Rectangle { + anchors.fill: parent + color: Style.pressedFillFor(root.text, Commons.Color.accent) + opacity: drag.holding ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: Style.duration(140) } } + } Text { x: slider.vertical ? (parent.width - width) / 2 : Style.space(12) y: slider.vertical ? parent.height - height - Style.space(12) : (parent.height - height) / 2 @@ -706,6 +715,15 @@ Item { property point pressedAt property bool moving: false property bool held: false + // Still for a moment: neither a tap nor a drag. The slider shows it is + // being held (the pressed tint, a little smaller) until the finger + // lifts or moves. + property bool holding: false + Timer { + id: holdHint + interval: 180 + onTriggered: if (drag.pressed && !drag.moving) drag.holding = true + } function valueAt(mouse) { return Math.max(0, Math.min(1, slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width)) } @@ -713,14 +731,21 @@ Item { pressedAt = Qt.point(mouse.x, mouse.y) moving = false held = false + holding = false + holdHint.restart() } onPositionChanged: function(mouse) { if (!pressed || held) return if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(10)) return moving = true + holding = false slider.moved(valueAt(mouse)) } - onReleased: function(mouse) { if (!moving && !held) slider.moved(valueAt(mouse)) } + onReleased: function(mouse) { + holding = false + if (!moving && !held) slider.moved(valueAt(mouse)) + } + onCanceled: holding = false onPressAndHold: if (!moving) { held = true; slider.longPressed() } } Rectangle { From 5b7a10433159d7054b039ee38083801c50294fbb Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:36:52 +0800 Subject: [PATCH 19/39] Control center: a long press arms the page; lifting opens it Held still for 0.4 s, a slider arms its page and shows it is held; lifting opens the page, sliding off cancels and sliding back arms it again. The level never moves in any of this. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 47ea8fbd..a0945829 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -709,21 +709,16 @@ Item { enabled: slider.available preventStealing: true // The level goes where the finger is: on a tap when it lifts, on a - // drag as soon as it moves and from then on. A long press (the page) - // is caught instead and changes nothing, so nothing happens on the - // touch itself before it is known which of the three it is. + // drag as soon as it moves and from then on. Held still (0.4 s), the + // touch arms the page instead and changes nothing: the slider shows it + // is held, lifting opens the page, sliding off cancels (and back on + // arms it again). Nothing happens on the touch itself before it is + // known which it is. + pressAndHoldInterval: 400 property point pressedAt property bool moving: false property bool held: false - // Still for a moment: neither a tap nor a drag. The slider shows it is - // being held (the pressed tint, a little smaller) until the finger - // lifts or moves. - property bool holding: false - Timer { - id: holdHint - interval: 180 - onTriggered: if (drag.pressed && !drag.moving) drag.holding = true - } + readonly property bool holding: held && containsMouse function valueAt(mouse) { return Math.max(0, Math.min(1, slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width)) } @@ -731,21 +726,20 @@ Item { pressedAt = Qt.point(mouse.x, mouse.y) moving = false held = false - holding = false - holdHint.restart() } onPositionChanged: function(mouse) { if (!pressed || held) return if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(10)) return moving = true - holding = false slider.moved(valueAt(mouse)) } onReleased: function(mouse) { - holding = false - if (!moving && !held) slider.moved(valueAt(mouse)) + if (held) { if (containsMouse) slider.longPressed() } + else if (!moving) slider.moved(valueAt(mouse)) + held = false } - onCanceled: holding = false + onCanceled: held = false + onPressAndHold: if (!moving) held = true onPressAndHold: if (!moving) { held = true; slider.longPressed() } } Rectangle { From efbda6739e19e1f55083637570c73835973bc024 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:37:32 +0800 Subject: [PATCH 20/39] Control center: drop the slider's old long-press handler Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index a0945829..c14c9991 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -740,7 +740,6 @@ Item { } onCanceled: held = false onPressAndHold: if (!moving) held = true - onPressAndHold: if (!moving) { held = true; slider.longPressed() } } Rectangle { id: chipBox From 2d47649f7332384b95772a57c48dc3993279e172 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:39:45 +0800 Subject: [PATCH 21/39] Control center: an armed slider turns into a drag along it Held to its page, a move along the slider disarms it and the level follows the finger after all; off it the other way still only cancels. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index c14c9991..1d122bfe 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -728,8 +728,15 @@ Item { held = false } onPositionChanged: function(mouse) { - if (!pressed || held) return - if (!moving && Math.abs(mouse.x - pressedAt.x) + Math.abs(mouse.y - pressedAt.y) <= Style.space(10)) return + if (!pressed) return + var along = slider.vertical ? Math.abs(mouse.y - pressedAt.y) : Math.abs(mouse.x - pressedAt.x) + var across = slider.vertical ? Math.abs(mouse.x - pressedAt.x) : Math.abs(mouse.y - pressedAt.y) + if (held) { + // Armed, a move along the slider disarms it and drags after all; + // off it the other way only cancels (containsMouse). + if (along <= Style.space(10) || along < across) return + held = false + } else if (!moving && along + across <= Style.space(10)) return moving = true slider.moved(valueAt(mouse)) } From 44c8a70e419f5e41a21c153b2f4795ddc1d88da4 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:42:03 +0800 Subject: [PATCH 22/39] Control center: a slider's page is always in sight Brightness gets the arrow chip the volume's output chip already is; a tap on it opens the page. While a long press holds a slider, its chip lights up in the accent: lifting goes there. The auto mark moves left of it. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 1d122bfe..8bb27ffd 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -454,6 +454,8 @@ Item { value: root.brightness < 0 ? 0 : root.brightness / 100 available: root.brightness >= 0 note: root.autoBrightness ? Commons.I18n.t("controlCenter.auto") : "" + pageArrow: true + onChipClicked: root.openPage("omarchy.monitor") onMoved: function(v) { root.setBrightness(v * 100) } onLongPressed: root.openPage("omarchy.monitor") } @@ -660,6 +662,8 @@ Item { property real value: 0 property string note: "" property string chip: "" + // A page with no chip of its own shows the arrow alone. + property bool pageArrow: false signal moved(real value) signal chipClicked() signal longPressed() @@ -694,7 +698,9 @@ Item { } Text { visible: slider.note !== "" - x: slider.vertical ? Style.space(12) : parent.width - width - Style.space(12) + // Left of the chip, which takes the right end. + x: slider.vertical ? Style.space(12) + : parent.width - width - Style.space(12) - (chipBox.visible ? chipBox.width + Style.space(8) : 0) y: slider.vertical ? Style.space(12) : (parent.height - height) / 2 textFormat: Text.PlainText text: slider.note @@ -750,24 +756,28 @@ Item { } Rectangle { id: chipBox - visible: slider.chip !== "" - x: slider.vertical ? Style.space(10) : parent.width - width - Style.space(10) + // The way to the slider's page, always in sight: a named chip (the + // output) or the arrow alone. While a long press holds the slider, it + // lights up: lifting goes there. + visible: slider.chip !== "" || slider.pageArrow + x: slider.vertical && slider.chip !== "" ? Style.space(10) : parent.width - width - Style.space(10) y: slider.vertical ? Style.space(10) : (parent.height - height) / 2 width: Math.min(chipRow.implicitWidth + Style.space(16), parent.width - Style.space(20)) height: Style.space(26) - color: Commons.Color.popups.background + color: drag.holding ? root.onFill : Commons.Color.popups.background border.width: Math.max(1, Style.space(1)) - border.color: Style.normalBorderColor + border.color: drag.holding ? root.onFill : Style.normalBorderColor radius: Style.cornerRadius Row { id: chipRow anchors.centerIn: parent spacing: Style.space(6) Text { + visible: slider.chip !== "" width: Math.min(implicitWidth, chipBox.parent.width - Style.space(48)) textFormat: Text.PlainText text: slider.chip - color: root.text + color: drag.holding ? root.onText : root.text font.family: Style.font.family font.pixelSize: Style.font.caption font.bold: true @@ -775,7 +785,7 @@ Item { } Text { text: "󰅂" - color: root.text + color: drag.holding ? root.onText : root.text font.family: Style.font.family font.pixelSize: Style.font.caption } From dd911a505121e1d30f28da7d89384f439e509ec0 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:42:58 +0800 Subject: [PATCH 23/39] Control center: the page arrow alone is just a glyph No box: the arrow in the slider's own ink, a little muted, the accent while a long press holds it. The output chip keeps its box. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 8bb27ffd..bc694a12 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -764,8 +764,17 @@ Item { y: slider.vertical ? Style.space(10) : (parent.height - height) / 2 width: Math.min(chipRow.implicitWidth + Style.space(16), parent.width - Style.space(20)) height: Style.space(26) - color: drag.holding ? root.onFill : Commons.Color.popups.background - border.width: Math.max(1, Style.space(1)) + // The arrow alone is only a glyph in the slider's own ink: dark on the + // fill, light beside it. + readonly property bool arrowOnly: slider.chip === "" + readonly property bool onFillPart: slider.vertical + ? (1 - (y + height / 2) / slider.height) < slider.value + : (x + width / 2) / slider.width < slider.value + readonly property color ink: drag.holding + ? (arrowOnly ? Commons.Color.accent : root.onText) + : (arrowOnly && onFillPart ? Commons.Color.background : root.text) + color: arrowOnly ? "transparent" : (drag.holding ? root.onFill : Commons.Color.popups.background) + border.width: arrowOnly ? 0 : Math.max(1, Style.space(1)) border.color: drag.holding ? root.onFill : Style.normalBorderColor radius: Style.cornerRadius Row { @@ -777,7 +786,7 @@ Item { width: Math.min(implicitWidth, chipBox.parent.width - Style.space(48)) textFormat: Text.PlainText text: slider.chip - color: drag.holding ? root.onText : root.text + color: chipBox.ink font.family: Style.font.family font.pixelSize: Style.font.caption font.bold: true @@ -785,9 +794,10 @@ Item { } Text { text: "󰅂" - color: drag.holding ? root.onText : root.text + color: chipBox.ink + opacity: chipBox.arrowOnly && !drag.holding ? 0.7 : 1 font.family: Style.font.family - font.pixelSize: Style.font.caption + font.pixelSize: chipBox.arrowOnly ? Style.font.body : Style.font.caption } } MouseArea { From 68d06f5dd912e53e1d4cda03a326085ad88871f3 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:44:30 +0800 Subject: [PATCH 24/39] Control center: the page arrow is only a hint Its tap area took the slider's top end; taps there set the level again, and the page opens by long press. The output chip stays a button. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index bc694a12..74140b6e 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -455,7 +455,6 @@ Item { available: root.brightness >= 0 note: root.autoBrightness ? Commons.I18n.t("controlCenter.auto") : "" pageArrow: true - onChipClicked: root.openPage("omarchy.monitor") onMoved: function(v) { root.setBrightness(v * 100) } onLongPressed: root.openPage("omarchy.monitor") } @@ -800,9 +799,12 @@ Item { font.pixelSize: chipBox.arrowOnly ? Style.font.body : Style.font.caption } } + // The arrow alone only shows there is a page (a long press opens + // it): the slider's end stays the slider's. A named chip is a button. MouseArea { anchors.fill: parent anchors.margins: -Style.space(8) + enabled: !chipBox.arrowOnly onClicked: slider.chipClicked() } } From 8528b6438527550f44d3e08abb0adad0b46c2b66 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:47:31 +0800 Subject: [PATCH 25/39] Control center: one rule, a tap never opens another level The volume's output chip and the tiles' chevrons become hints; a long press arms a tile's page as it does a slider's (held look, page on lift, slide off cancels). A right click still opens it with a mouse. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 74140b6e..3646330e 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -467,7 +467,6 @@ Item { available: !!(root.sink && root.sink.audio) chip: root.outputName onMoved: function(v) { root.setVolume(v) } - onChipClicked: root.openPage("omarchy.audio") onLongPressed: root.openPage("omarchy.audio") } } @@ -589,15 +588,29 @@ Item { } } } - // Tap toggles; the chevron, a long press or a right click opens the page. + // Tap toggles; a right click opens the page. Held still (0.4 s), the + // touch arms the page as on a slider: the tile shows it is held, lifting + // opens the page, sliding off cancels. One rule for every control: a tap + // never opens another level. + scale: tileMouse.holding ? 0.96 : 1 + Behavior on scale { NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic } } MouseArea { + id: tileMouse anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton - onPressed: tile.pressed = true - onReleased: tile.pressed = false - onCanceled: tile.pressed = false - onPressAndHold: { tile.pressed = false; if (tile.page) root.openPage(tile.page) } + pressAndHoldInterval: 400 + property bool held: false + readonly property bool holding: held && containsMouse + onPressed: { tile.pressed = true; held = false } + onReleased: { + tile.pressed = false + if (held && containsMouse && tile.page) root.openPage(tile.page) + held = false + } + onCanceled: { tile.pressed = false; held = false } + onPressAndHold: if (tile.page) held = true onClicked: function(mouse) { + if (held) return if (mouse.button === Qt.RightButton) { if (tile.page) root.openPage(tile.page) } else tile.activate() } @@ -610,11 +623,12 @@ Item { Text { anchors.centerIn: parent text: "󰅂" - color: tile.ink + color: tileMouse.holding ? Commons.Color.accent : tile.ink font.family: Style.font.family font.pixelSize: Style.font.body } - MouseArea { anchors.fill: parent; onClicked: root.openPage(tile.page) } + // A hint only: a tap toggles anywhere on the tile, a long press (or a + // right click) opens the page. } } @@ -664,7 +678,6 @@ Item { // A page with no chip of its own shows the arrow alone. property bool pageArrow: false signal moved(real value) - signal chipClicked() signal longPressed() function adjust(delta) { if (slider.available) slider.moved(Math.max(0, Math.min(1, slider.value + delta))) } color: Style.controlFill(false, false, root.text, Commons.Color.accent) @@ -799,14 +812,8 @@ Item { font.pixelSize: chipBox.arrowOnly ? Style.font.body : Style.font.caption } } - // The arrow alone only shows there is a page (a long press opens - // it): the slider's end stays the slider's. A named chip is a button. - MouseArea { - anchors.fill: parent - anchors.margins: -Style.space(8) - enabled: !chipBox.arrowOnly - onClicked: slider.chipClicked() - } + // Only a hint that there is a page: a long press opens it, and a tap + // here sets the level like anywhere else on the slider. } } From c717f33fbe9ad7eeb04d54df723787aa575276e8 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 01:49:18 +0800 Subject: [PATCH 26/39] Control center: held on, a long press opens by itself Armed after 0.4 s, a control opens its page by itself 0.6 s later if the finger is still on it; lifting before still opens it, sliding off still cancels, and once open the rest of the touch does nothing. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 3646330e..fc7f232b 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -600,17 +600,30 @@ Item { acceptedButtons: Qt.LeftButton | Qt.RightButton pressAndHoldInterval: 400 property bool held: false + property bool used: false readonly property bool holding: held && containsMouse - onPressed: { tile.pressed = true; held = false } + // Held on armed a while longer, it opens without waiting for the lift. + Timer { + id: tileHoldOpen + interval: 600 + onTriggered: if (tileMouse.holding) { + tileMouse.held = false + tileMouse.used = true + tile.pressed = false + root.openPage(tile.page) + } + } + onPressed: { tile.pressed = true; held = false; used = false } onReleased: { + tileHoldOpen.stop() tile.pressed = false - if (held && containsMouse && tile.page) root.openPage(tile.page) + if (!used && held && containsMouse && tile.page) root.openPage(tile.page) held = false } - onCanceled: { tile.pressed = false; held = false } - onPressAndHold: if (tile.page) held = true + onCanceled: { tile.pressed = false; held = false; used = false; tileHoldOpen.stop() } + onPressAndHold: if (tile.page) { held = true; tileHoldOpen.restart() } onClicked: function(mouse) { - if (held) return + if (held || used) return if (mouse.button === Qt.RightButton) { if (tile.page) root.openPage(tile.page) } else tile.activate() } @@ -736,7 +749,15 @@ Item { property point pressedAt property bool moving: false property bool held: false + // The page opened by holding on: the rest of the touch does nothing. + property bool used: false readonly property bool holding: held && containsMouse + // Held on armed a while longer, it opens without waiting for the lift. + Timer { + id: sliderHoldOpen + interval: 600 + onTriggered: if (drag.holding) { drag.held = false; drag.used = true; slider.longPressed() } + } function valueAt(mouse) { return Math.max(0, Math.min(1, slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width)) } @@ -744,9 +765,10 @@ Item { pressedAt = Qt.point(mouse.x, mouse.y) moving = false held = false + used = false } onPositionChanged: function(mouse) { - if (!pressed) return + if (!pressed || used) return var along = slider.vertical ? Math.abs(mouse.y - pressedAt.y) : Math.abs(mouse.x - pressedAt.x) var across = slider.vertical ? Math.abs(mouse.x - pressedAt.x) : Math.abs(mouse.y - pressedAt.y) if (held) { @@ -754,17 +776,20 @@ Item { // off it the other way only cancels (containsMouse). if (along <= Style.space(10) || along < across) return held = false + sliderHoldOpen.stop() } else if (!moving && along + across <= Style.space(10)) return moving = true slider.moved(valueAt(mouse)) } onReleased: function(mouse) { + sliderHoldOpen.stop() + if (used) { used = false; return } if (held) { if (containsMouse) slider.longPressed() } else if (!moving) slider.moved(valueAt(mouse)) held = false } - onCanceled: held = false - onPressAndHold: if (!moving) held = true + onCanceled: { held = false; used = false; sliderHoldOpen.stop() } + onPressAndHold: if (!moving) { held = true; sliderHoldOpen.restart() } } Rectangle { id: chipBox From 6c6a91f81b67d59295726a88e8c40975937f3f4c Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:16:06 +0800 Subject: [PATCH 27/39] Control center: pressed, a control only shrinks No grey tint on a pressed tile, toggle or held slider; the shrink (and an armed page's hint in the accent) is enough. Assisted-by: LLM --- .../shell/shell/controlcenter/ControlCenter.qml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index fc7f232b..0492c644 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -538,8 +538,10 @@ Item { Component.onCompleted: root.registerCell(cell) radius: Style.cornerRadius color: !available ? "transparent" - : (pressed ? Style.pressedFillFor(root.text, Commons.Color.accent) - : (on ? root.onFill : Style.controlFill(false, false, root.text, Commons.Color.accent))) + : (on ? root.onFill : Style.controlFill(false, false, root.text, Commons.Color.accent)) + // Pressed, it only shrinks a little: no tint. + scale: pressed ? 0.96 : 1 + Behavior on scale { NumberAnimation { duration: Style.duration(120); easing.type: Easing.OutCubic } } border.width: Math.max(1, Style.space(1)) border.color: focused ? Commons.Color.accent : (on && available ? root.onFill : Style.normalBorderColor) opacity: available ? 1 : 0.45 @@ -592,8 +594,6 @@ Item { // touch arms the page as on a slider: the tile shows it is held, lifting // opens the page, sliding off cancels. One rule for every control: a tap // never opens another level. - scale: tileMouse.holding ? 0.96 : 1 - Behavior on scale { NumberAnimation { duration: Style.duration(140); easing.type: Easing.OutCubic } } MouseArea { id: tileMouse anchors.fill: parent @@ -706,13 +706,7 @@ Item { color: root.text opacity: 0.85 } - // The pressed tint while held. - Rectangle { - anchors.fill: parent - color: Style.pressedFillFor(root.text, Commons.Color.accent) - opacity: drag.holding ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: Style.duration(140) } } - } + Text { x: slider.vertical ? (parent.width - width) / 2 : Style.space(12) y: slider.vertical ? parent.height - height - Style.space(12) : (parent.height - height) / 2 From 4778d3f35e6b1cf264d5b037709f1f80894ac42e Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:20:28 +0800 Subject: [PATCH 28/39] Control center: held on, a page opens 0.4 s after arming Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 0492c644..8a6dec8d 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -605,7 +605,7 @@ Item { // Held on armed a while longer, it opens without waiting for the lift. Timer { id: tileHoldOpen - interval: 600 + interval: 400 onTriggered: if (tileMouse.holding) { tileMouse.held = false tileMouse.used = true @@ -749,7 +749,7 @@ Item { // Held on armed a while longer, it opens without waiting for the lift. Timer { id: sliderHoldOpen - interval: 600 + interval: 400 onTriggered: if (drag.holding) { drag.held = false; drag.used = true; slider.longPressed() } } function valueAt(mouse) { From 34ab8180dba165dbca85ea917f6fe5fe78984a71 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:37:41 +0800 Subject: [PATCH 29/39] Control center: an armed tile keeps its touch Moving the finger to cancel an armed long press dragged the control center away; once armed, the tile keeps the touch, so moving only cancels. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 8a6dec8d..a8f761c5 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -599,6 +599,9 @@ Item { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton pressAndHoldInterval: 400 + // Armed, the touch is the tile's: moving the finger cancels and never + // drags the control center away (before that, it still may). + preventStealing: held property bool held: false property bool used: false readonly property bool holding: held && containsMouse From ceb29e2e6202e0c2f169a1d8a011ba4c42b7bf7c Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:39:19 +0800 Subject: [PATCH 30/39] Control center: buttons keep their touch; sliding off cancels A drag starting on a tile or toggle dragged the control center away instead of cancelling the press. Buttons now keep their touch as on iOS: sliding off cancels (the press look goes), sliding back arms again; the control center is dragged from its gaps, or put away by a tap outside. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index a8f761c5..f84afad4 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -549,6 +549,7 @@ Item { component Tile: Cell { id: tile + pressed: tileMouse.pressed && tileMouse.containsMouse property string glyph: "" property string title: "" property string subtitle: "" @@ -599,9 +600,9 @@ Item { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton pressAndHoldInterval: 400 - // Armed, the touch is the tile's: moving the finger cancels and never - // drags the control center away (before that, it still may). - preventStealing: held + // A button keeps its touch: sliding off cancels, and the control center + // is not dragged away. + preventStealing: true property bool held: false property bool used: false readonly property bool holding: held && containsMouse @@ -612,18 +613,16 @@ Item { onTriggered: if (tileMouse.holding) { tileMouse.held = false tileMouse.used = true - tile.pressed = false root.openPage(tile.page) } } - onPressed: { tile.pressed = true; held = false; used = false } + onPressed: { held = false; used = false } onReleased: { tileHoldOpen.stop() - tile.pressed = false if (!used && held && containsMouse && tile.page) root.openPage(tile.page) held = false } - onCanceled: { tile.pressed = false; held = false; used = false; tileHoldOpen.stop() } + onCanceled: { held = false; used = false; tileHoldOpen.stop() } onPressAndHold: if (tile.page) { held = true; tileHoldOpen.restart() } onClicked: function(mouse) { if (held || used) return @@ -672,12 +671,14 @@ Item { font.pixelSize: Style.font.caption } } + // A button keeps its touch: sliding off cancels (the press look goes), + // sliding back on arms it again; the control center is not dragged. + pressed: toggleMouse.pressed && toggleMouse.containsMouse MouseArea { + id: toggleMouse anchors.fill: parent enabled: toggle.available - onPressed: toggle.pressed = true - onReleased: toggle.pressed = false - onCanceled: toggle.pressed = false + preventStealing: true onClicked: toggle.activate() } } From a1d2745b1c1b9062bceac01940247e274671c769 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:40:37 +0800 Subject: [PATCH 31/39] Control center: a touch that held a page open is spent When a long press opened a page under a still-held finger, the main view hid, let go of the touch, and the dismiss drag picked it up. That touch now counts for nothing more until the finger lifts. Assisted-by: LLM --- .../shell/shell/controlcenter/ControlCenter.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index f84afad4..c33dcefa 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -227,6 +227,8 @@ Item { // Let go, it keeps the finger's speed and a spring carries it to open or // back, by how far it came and how fast it was moving. property bool pulling: false + // A long press opened a page while the finger is still down (see above). + property bool touchSpent: false readonly property real pullSpan: Math.max(1, card.y + card.height) property real pullFrom: 0 @@ -371,10 +373,17 @@ Item { xAxis.enabled: false acceptedDevices: PointerDevice.TouchScreen grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType - enabled: root.opened || root.pulling + enabled: (root.opened || root.pulling) && !root.touchSpent onActiveChanged: active ? root.beginPull() : root.endPull(centroid.velocity.y) onTranslationChanged: if (active) root.pullTo(translation.y) } + // The touch that held a control until its page opened is spent: once + // the control lets go of it (its view hides), nothing else takes it. + // The next touch counts again. + PointHandler { + acceptedDevices: PointerDevice.TouchScreen + onActiveChanged: if (!active) root.touchSpent = false + } } Rectangle { @@ -613,6 +622,7 @@ Item { onTriggered: if (tileMouse.holding) { tileMouse.held = false tileMouse.used = true + root.touchSpent = true root.openPage(tile.page) } } @@ -754,7 +764,7 @@ Item { Timer { id: sliderHoldOpen interval: 400 - onTriggered: if (drag.holding) { drag.held = false; drag.used = true; slider.longPressed() } + onTriggered: if (drag.holding) { drag.held = false; drag.used = true; root.touchSpent = true; slider.longPressed() } } function valueAt(mouse) { return Math.max(0, Math.min(1, slider.vertical ? 1 - mouse.y / slider.height : mouse.x / slider.width)) From 9966c9b5d07fbfa9ed5782229cf30d0260a3fb3c Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:41:33 +0800 Subject: [PATCH 32/39] Control center: a spent touch reaches nothing While the touch that held a page open is still down, a cover over the control center takes everything it does (hover included) until it lifts. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index c33dcefa..2b523eb7 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -386,6 +386,17 @@ Item { } } + // While a touch is spent, it reaches nothing: no hover, press or drag + // on the page that opened under it, until the finger lifts. + MouseArea { + anchors.fill: parent + z: 20 + visible: root.touchSpent + hoverEnabled: true + preventStealing: true + acceptedButtons: Qt.AllButtons + } + Rectangle { id: card x: root.phone ? 0 : parent.width - width - Style.gapsOut From bd37a1b0ca7e8a0c66e64c35b8a1a75090a7a119 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:41:57 +0800 Subject: [PATCH 33/39] Control center: a spent touch never blocks it for good Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 2b523eb7..a7e2db48 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -215,6 +215,7 @@ Item { Qt.callLater(function() { keyCatcher.forceActiveFocus() }) } function close() { + root.touchSpent = false if (!root.opened) return root.closingFromOpen = true root.opened = false @@ -381,9 +382,17 @@ Item { // the control lets go of it (its view hides), nothing else takes it. // The next touch counts again. PointHandler { + id: anyTouch acceptedDevices: PointerDevice.TouchScreen onActiveChanged: if (!active) root.touchSpent = false } + // Never stuck: no finger down any more, the touch is over. + Timer { + interval: 250 + repeat: true + running: root.touchSpent + onTriggered: if (!anyTouch.active) root.touchSpent = false + } } // While a touch is spent, it reaches nothing: no hover, press or drag From ccbcf69cd0d1a08d5392aa467d9c07cd60de6d87 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 02:43:55 +0800 Subject: [PATCH 34/39] Control center: a long press arms at 0.2 s, opens by itself 0.6 s later Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index a7e2db48..8f8cd390 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -620,7 +620,7 @@ Item { } } } - // Tap toggles; a right click opens the page. Held still (0.4 s), the + // Tap toggles; a right click opens the page. Held still (0.2 s), the // touch arms the page as on a slider: the tile shows it is held, lifting // opens the page, sliding off cancels. One rule for every control: a tap // never opens another level. @@ -628,7 +628,7 @@ Item { id: tileMouse anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton - pressAndHoldInterval: 400 + pressAndHoldInterval: 200 // A button keeps its touch: sliding off cancels, and the control center // is not dragged away. preventStealing: true @@ -638,7 +638,7 @@ Item { // Held on armed a while longer, it opens without waiting for the lift. Timer { id: tileHoldOpen - interval: 400 + interval: 600 onTriggered: if (tileMouse.holding) { tileMouse.held = false tileMouse.used = true @@ -768,12 +768,12 @@ Item { enabled: slider.available preventStealing: true // The level goes where the finger is: on a tap when it lifts, on a - // drag as soon as it moves and from then on. Held still (0.4 s), the + // drag as soon as it moves and from then on. Held still (0.2 s), the // touch arms the page instead and changes nothing: the slider shows it // is held, lifting opens the page, sliding off cancels (and back on // arms it again). Nothing happens on the touch itself before it is // known which it is. - pressAndHoldInterval: 400 + pressAndHoldInterval: 200 property point pressedAt property bool moving: false property bool held: false @@ -783,7 +783,7 @@ Item { // Held on armed a while longer, it opens without waiting for the lift. Timer { id: sliderHoldOpen - interval: 400 + interval: 600 onTriggered: if (drag.holding) { drag.held = false; drag.used = true; root.touchSpent = true; slider.longPressed() } } function valueAt(mouse) { From d57d4b121ba4ace870e08b771fec697ad7b810a3 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 03:21:25 +0800 Subject: [PATCH 35/39] Control center: smooth on slow GPUs While it moves the card is drawn once into a texture that is only scaled, moved and faded, instead of every text and icon again each frame; at rest it is drawn directly and stays sharp. The spring takes the real time since the last frame in small fixed steps, so a slow frame moves it further instead of slowing it down. Assisted-by: LLM --- .../shell/controlcenter/ControlCenter.qml | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 8f8cd390..6d213141 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -279,13 +279,22 @@ Item { FrameAnimation { id: spring onTriggered: { - var dt = Math.min(frameTime, 1 / 30) + // The real time since the last frame, in small fixed steps: a slow + // frame (software rendering) moves it further rather than slower. + var elapsed = Math.min(frameTime, 0.25) // Softer going out: it is seen to travel up rather than vanish. var stiffness = root.springTarget > 0 ? 260 : 195 var damping = 2 * Math.sqrt(stiffness) * (root.springTarget > 0 ? 0.78 : 1.0) - var force = -stiffness * (root.reveal - root.springTarget) - damping * root.springVelocity - root.springVelocity += force * dt - root.reveal += root.springVelocity * dt + var steps = Math.max(1, Math.ceil(elapsed / (1 / 240))) + var dt = elapsed / steps + var reveal = root.reveal, velocity = root.springVelocity + for (var i = 0; i < steps; i++) { + var force = -stiffness * (reveal - root.springTarget) - damping * velocity + velocity += force * dt + reveal += velocity * dt + } + root.springVelocity = velocity + root.reveal = reveal if (Math.abs(root.reveal - root.springTarget) < 0.002 && Math.abs(root.springVelocity) < 0.02) { root.reveal = root.springTarget root.springVelocity = 0 @@ -295,6 +304,9 @@ Item { } } + // Moving: the spring or a finger. + readonly property bool moving: spring.running || root.pulling + // While open, a note for the Home button (omarchy-home-button closes it). readonly property string openNote: (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/omarchy-control-center-open" onOpenedChanged: Quickshell.execDetached(opened ? ["touch", openNote] : ["rm", "-f", openNote]) @@ -408,6 +420,10 @@ Item { Rectangle { id: card + // While it moves, drawn once into a texture that is only scaled, moved + // and faded (cheap on any GPU); at rest drawn directly, sharp. + layer.enabled: root.moving + layer.smooth: true x: root.phone ? 0 : parent.width - width - Style.gapsOut y: root.phone ? root.barInset : root.barInset + Style.gapsOut width: root.phone ? parent.width : root.cardWidth From 4290fd3bd2d1fb487f41fefcfffae65286bf522d Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 03:23:31 +0800 Subject: [PATCH 36/39] Control center: the bar popups' border Its card drew a plain 1-point line; it takes the popups' border spec from the theme now, as the bar's popups (KeyboardPanel) do. Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 6d213141..5cfd143a 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -418,7 +418,7 @@ Item { acceptedButtons: Qt.AllButtons } - Rectangle { + BorderSurface { id: card // While it moves, drawn once into a texture that is only scaled, moved // and faded (cheap on any GPU); at rest drawn directly, sharp. @@ -429,8 +429,9 @@ Item { width: root.phone ? parent.width : root.cardWidth height: root.phone ? parent.height - root.barInset : content.implicitHeight + root.pad * 2 color: root.phone ? "transparent" : Commons.Color.popups.background - border.width: root.phone ? 0 : Math.max(1, Style.space(1)) - border.color: Commons.Color.popups.border + // The bar's popups' own border (KeyboardPanel): the theme's spec. + borderSpec: root.phone ? Border.none() + : Border.surfaceSpec("popups", "border", Commons.Color.popups.border, Math.max(1, Style.space(2))) radius: Style.cornerRadius // Its bottom edge is where the finger is: reveal is the finger's way // down as a share of the card's bottom. On the way it grows out of its From 8f19ff0aac50e8d90aeb32672fe56a42f8475df4 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 03:32:14 +0800 Subject: [PATCH 37/39] Control center: a phone's sliders are horizontal too Brightness and volume are full-width rows on a phone as on an iPad (48 points tall there), instead of tall squares side by side. Assisted-by: LLM --- .../shell/shell/controlcenter/ControlCenter.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 5cfd143a..3a0b8711 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -487,15 +487,14 @@ Item { } } - // Brightness and volume: one row each on an iPad, side by side as - // tall squares on a phone. + // Brightness and volume: one full-width row each, a phone's taller. Grid { - columns: root.phone ? 2 : 1 + columns: 1 spacing: root.gap Slider { - width: root.phone ? (content.width - root.gap) / 2 : content.width - height: root.phone ? Style.space(150) : Style.space(44) - vertical: root.phone + width: content.width + height: Style.space(root.phone ? 48 : 44) + vertical: false glyph: "󰃞" value: root.brightness < 0 ? 0 : root.brightness / 100 available: root.brightness >= 0 @@ -505,9 +504,9 @@ Item { onLongPressed: root.openPage("omarchy.monitor") } Slider { - width: root.phone ? (content.width - root.gap) / 2 : content.width - height: root.phone ? Style.space(150) : Style.space(44) - vertical: root.phone + width: content.width + height: Style.space(root.phone ? 48 : 44) + vertical: false glyph: root.volume <= 0 || (root.sink && root.sink.audio && root.sink.audio.muted) ? "󰝟" : "󰕾" value: root.volume available: !!(root.sink && root.sink.audio) From ec45d5b7b07065adebbcfb2d41ff452fdeb95830 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 03:32:53 +0800 Subject: [PATCH 38/39] Control center: a phone's status bar stays above it Assisted-by: LLM --- desktop/shell/shell/controlcenter/ControlCenter.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/shell/shell/controlcenter/ControlCenter.qml b/desktop/shell/shell/controlcenter/ControlCenter.qml index 3a0b8711..bc8e7f28 100644 --- a/desktop/shell/shell/controlcenter/ControlCenter.qml +++ b/desktop/shell/shell/controlcenter/ControlCenter.qml @@ -334,7 +334,10 @@ Item { // iPad: the rest of the screen dims, and a tap there closes. Phone: the // control center is the screen. Rectangle { - anchors.fill: parent + // A phone keeps its status bar above it. + y: root.phone ? root.barInset : 0 + width: parent.width + height: parent.height - y color: root.phone ? Commons.Color.menu.background : Commons.Color.menu.scrim opacity: Math.max(0, Math.min(1, root.reveal)) MouseArea { From 625b0136bc1b06d7b6a1741a34532c0a2da45b1f Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 20 Nov 2026 05:12:44 +0800 Subject: [PATCH 39/39] Changelog: the control center Assisted-by: LLM --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039859a0..fbf6f081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ is missing or empty. - The lock screen shows the status icons in its corner: Wi-Fi, battery, and Bluetooth, a muted microphone, rotation lock and Stay Awake when they're on. - The lock screen's keypad is cleaner: digits only, without key backgrounds. +- A control center: pull down from the top right, click its icon or press + Super+Ctrl+1 for Wi-Fi, Bluetooth, brightness, volume and quick toggles. + Long-press for the full settings pages. ## [0.3.2] - 2026-11-19