diff --git a/surfaces/quickshell/modules/settings/IdleConfig.qml b/surfaces/quickshell/modules/settings/IdleConfig.qml index 34cb383..840f0bc 100644 --- a/surfaces/quickshell/modules/settings/IdleConfig.qml +++ b/surfaces/quickshell/modules/settings/IdleConfig.qml @@ -29,17 +29,23 @@ ContentPage { forceWidth: true // --- Live stage readout (polled over IPC) ---------------------------- - // 0 Active · 1 Dimmed · 2 Lock requested · 3 Lock secure — the - // IdleCoordinator.State enum, surfaced through session.state(). + // 0 Active · 1 Dimmed · 2 Lock requested · 3 Lock secure · + // 4 Suspending · 5 Asleep · 6 Waking — the IdleCoordinator.State + // enum, surfaced through session.state(). property int liveStage: -1 property bool liveNative: false property bool probeOk: false + property bool sleepInhibitorHeld: false + property bool stepUpEnabled: false readonly property var stageNames: [ Translation.tr("Active"), Translation.tr("Dimmed"), Translation.tr("Lock requested"), - Translation.tr("Lock secure") + Translation.tr("Lock secure"), + Translation.tr("Suspending"), + Translation.tr("Asleep"), + Translation.tr("Waking") ] function stageLabel(s) { return (s >= 0 && s < stageNames.length) ? stageNames[s] : Translation.tr("unknown"); @@ -55,6 +61,8 @@ ContentPage { const d = JSON.parse(stateOut.text); page.liveStage = d.idle?.stage ?? -1; page.liveNative = d.idle?.nativeCoordinatorEnabled ?? false; + page.sleepInhibitorHeld = d.sleepInhibitorHeld ?? false; + page.stepUpEnabled = d.stepUp?.grantTtlMs > 0 ?? false; page.probeOk = true; } catch (e) { page.probeOk = false; @@ -98,6 +106,22 @@ ContentPage { ? Translation.tr("The native coordinator is driving idle transitions. Dim and lock fire on the timers below.") : Translation.tr("The native coordinator is off, so the timers below do not run — hypridle owns screen-off. Only lock-requested and lock-secure transitions are reported here.") } + + RowLayout { + Layout.fillWidth: true + spacing: 12 + + StyledText { + text: page.sleepInhibitorHeld + ? Translation.tr("Sleep inhibitor: held (suspend blocked until lock is secure)") + : Translation.tr("Sleep inhibitor: released (suspend may proceed)") + font.pixelSize: Appearance.font.pixelSize.normal + color: page.sleepInhibitorHeld + ? Appearance.colors.colOnLayer1 + : Appearance.colors.colSubtext + } + } + } } ContentSection {