1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

feat: power off monitors when lock screen activates (#1402)

Add ability to immediately power off monitors when the lock screen
activates, controlled by a new setting "Power off monitors on lock".
Uses a 100ms polling timer to detect when the session lock actually
becomes active, then invokes compositor-specific DPMS commands.

For niri, uses the new power-off-monitors action via niri msg CLI
with socket fallback.

Wake on input: first input after lock arms wake, second input
actually powers monitors back on while keeping the lock screen visible.

Closes #1157
This commit is contained in:
Kamil Chmielewski
2026-01-18 19:08:58 +01:00
committed by GitHub
parent 13dededcc9
commit a685d9da52
4 changed files with 109 additions and 7 deletions

View File

@@ -131,6 +131,15 @@ Item {
onToggled: checked => SettingsData.set("lockBeforeSuspend", checked)
}
SettingsToggleRow {
settingKey: "lockScreenPowerOffMonitorsOnLock"
tags: ["lock", "screen", "monitor", "display", "dpms", "power"]
text: I18n.tr("Power off monitors on lock")
description: I18n.tr("Turn off all displays immediately when the lock screen activates")
checked: SettingsData.lockScreenPowerOffMonitorsOnLock
onToggled: checked => SettingsData.set("lockScreenPowerOffMonitorsOnLock", checked)
}
SettingsToggleRow {
settingKey: "enableFprint"
tags: ["lock", "screen", "fingerprint", "authentication", "biometric", "fprint"]