pragma ComponentBehavior: Bound import QtQuick import Quickshell import Quickshell.Wayland import qs.HyprChrome.Widgets.Luna // Voice-mode surface: top-left, directly under the rail. // // Thin by design — the visuals are all in LunaIndicator so they stay // headless-renderable. Anchoring top+left is enough to sit under the bar: // the rail sets an exclusiveZone of its collapsed height, so the compositor // places this below it without either surface knowing the other's metrics. // // NOT a modal. She never takes the keyboard — the whole point is that you // keep working while talking — so this does not join the shell's `modalOpen` // and raises no scrim. PanelWindow { id: window required property var state required property var targetScreen // The rail's settled height, from the shell. Not the compositor's job // here: the bar's exclusive zone leaves this surface at the top of the // output, so the gap is opened by hand. required property real barHeight screen: window.targetScreen visible: window.state.active anchors { top: true; left: true } margins { left: 8; top: window.barHeight + 8 } implicitWidth: indicator.implicitWidth implicitHeight: indicator.implicitHeight color: "transparent" // Below the rail's own layer: this is a readout, not a surface that // should ever cover the bar. WlrLayershell.layer: WlrLayer.Top // A readout that stole focus would break typing the moment she answered. WlrLayershell.keyboardFocus: WlrKeyboardFocus.None // Normal with a zero zone: reserve nothing of our own, but still RESPECT // the rail's exclusion so the compositor places this under it. Ignore // would skip other surfaces' zones too, which put it over the bar. exclusionMode: ExclusionMode.Normal exclusiveZone: 0 LunaIndicator { id: indicator anchors.fill: parent state: window.state.state active: window.state.active connected: window.state.connected rms: window.state.rms userText: window.state.userText lunaText: window.state.lunaText } }