diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index 3b9901485..22f3a7d8a 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -663,7 +663,7 @@ PanelWindow { IdleInhibitor { window: barWindow - enabled: SessionService.idleInhibited + enabled: SessionService.idleInhibited || IdleService.externalInhibitActive } Connections { diff --git a/quickshell/Services/IdleService.qml b/quickshell/Services/IdleService.qml index 95c123aaa..38516dc04 100644 --- a/quickshell/Services/IdleService.qml +++ b/quickshell/Services/IdleService.qml @@ -39,7 +39,7 @@ Singleton { // compositor honoring the bar-surface zwp_idle_inhibit inhibitor, // which goes inactive whenever the bar surface is occluded // (fullscreen windows) or hidden (auto-hide). - const base = enabled && !SessionService.idleInhibited; + const base = enabled && !SessionService.idleInhibited && !externalInhibitActive; monitorOffMonitor.enabled = base && monitorTimeout > 0 && !postLockMonitorActive; postLockMonitorOffMonitor.enabled = enabled && postLockMonitorActive; lockMonitor.enabled = base && lockTimeout > 0; @@ -182,21 +182,11 @@ Singleton { if (externalInhibitActive) { const apps = DMSService.screensaverInhibitors.map(i => i.appName).join(", "); log.info("External idle inhibit active from:", apps || "unknown"); - SessionService.idleInhibited = true; - SessionService.inhibitReason = "External app: " + (apps || "unknown"); } else { log.info("External idle inhibit released"); - SessionService.idleInhibited = false; - SessionService.inhibitReason = "Keep system awake"; } + _rearmIdleMonitors(); } - Component.onCompleted: { - _applyMonitorEnableds(); - if (externalInhibitActive) { - const apps = DMSService.screensaverInhibitors.map(i => i.appName).join(", "); - SessionService.idleInhibited = true; - SessionService.inhibitReason = "External app: " + (apps || "unknown"); - } - } + Component.onCompleted: _applyMonitorEnableds() }