Top-left under the rail: whether the mic is open, whether she is thinking, and whether she is talking — the states a 5s reply makes you want to see. No avatar yet; the meter is a placeholder for it, and the states and their colours are the part that has to read correctly first. LunaIndicator is Item-rooted so render.sh can shoot all five states offscreen (tests/LunaIndicatorHeadless.qml); LunaCall is the thin PanelWindow. Beside the notification stack rather than among the modals: it never takes the keyboard and raises no scrim, so it is deliberately absent from `modalOpen`. LunaState is read-only — the toggle runs the CLI — and treats a missing socket as normal, since the daemon is a user service that may start after the shell or not be installed at all. Two things measurement decided rather than reasoning. ExclusionMode .Ignore put it OVER the bar (it ignores other surfaces' zones, not just its own), and switching to Normal was not enough either: the rail's exclusive zone still left it at y=8 against a bar occupying 0..147. So the shell passes bar.contentHeight down, the same value the backdrop already reads. And the card is one chamfered path rather than a rectangle with a triangle over its corner, which left the square border showing underneath and read as an artifact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
56 lines
1.3 KiB
QML
56 lines
1.3 KiB
QML
import QtQuick
|
|
import qs.HyprChrome.Widgets.Luna
|
|
|
|
// Offscreen render of every voice-mode state, plus the disconnected one —
|
|
// the states are the whole point of this widget, and a broken colour or a
|
|
// collapsed meter is invisible in a screenshot of just one of them.
|
|
//
|
|
// ./tools/quickshell-preview/render.sh \
|
|
// tests/LunaIndicatorHeadless.qml \
|
|
// .artifacts/quickshell-preview/luna.png 300 620
|
|
Rectangle {
|
|
width: 300
|
|
height: 620
|
|
color: "#1b1d20"
|
|
|
|
Column {
|
|
x: 20
|
|
y: 20
|
|
width: 260
|
|
spacing: 14
|
|
|
|
LunaIndicator {
|
|
width: parent.width
|
|
state: "idle"
|
|
rms: 0.002
|
|
}
|
|
|
|
LunaIndicator {
|
|
width: parent.width
|
|
state: "listening"
|
|
rms: 0.08
|
|
userText: "hey luna, are you there"
|
|
}
|
|
|
|
LunaIndicator {
|
|
width: parent.width
|
|
state: "thinking"
|
|
userText: "what's the time?"
|
|
}
|
|
|
|
LunaIndicator {
|
|
width: parent.width
|
|
state: "speaking"
|
|
rms: 0.14
|
|
userText: "what's the time?"
|
|
lunaText: "It's 22:25 on Sunday night, chief. Shouldn't you be asleep?"
|
|
}
|
|
|
|
LunaIndicator {
|
|
width: parent.width
|
|
state: "idle"
|
|
connected: false
|
|
}
|
|
}
|
|
}
|