refactor: Integrate IdleMonitor and IdleInhibitor into IdleState to manage system idle and inhibit functionality in singleton and not multiple times

This commit is contained in:
Hannes
2026-08-24 23:37:10 +02:00
parent 4d2c99df65
commit c77020dc69
2 changed files with 18 additions and 17 deletions
+17
View File
@@ -2,11 +2,28 @@ pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import "../../../../config"
Item {
// true = inhibit idle (prevent hypridle/lock/dpms), false = allow idle
property bool idle: false
property bool isIdle: idleMonitor.isIdle
property PanelWindow panelWindow: null
IdleInhibitor {
id: idleInhibitor
window: panelWindow
enabled: IdleState.idle
}
IdleMonitor {
id: idleMonitor
enabled: true
timeout: 30
respectInhibitors: true
}
// may need this in hypridle.conf
// general {