1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

Implement IdleMonitor to replace swayidle/hypridle functionality

This commit is contained in:
bbedward
2025-09-19 15:59:40 -04:00
parent e6265c2f71
commit 691b6da7a7
10 changed files with 584 additions and 2 deletions

View File

@@ -162,6 +162,26 @@ Singleton {
}
}
function powerOffMonitors() {
if (isNiri) {
return NiriService.powerOffMonitors()
}
if (isHyprland) {
return Hyprland.dispatch("dpms off")
}
console.warn("CompositorService: Cannot power off monitors, unknown compositor")
}
function powerOnMonitors() {
if (isNiri) {
return NiriService.powerOnMonitors()
}
if (isHyprland) {
return Hyprland.dispatch("dpms on")
}
console.warn("CompositorService: Cannot power on monitors, unknown compositor")
}
Process {
id: niriSocketCheck
command: ["test", "-S", root.niriSocket]