lock screen: skip entrance animation on wake from sleep via SleepService

This commit is contained in:
Damocles 2026-04-24 21:26:26 +02:00
parent 4256c3b86f
commit 0c955f93f8
3 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,22 @@
pragma Singleton
import QtQuick
import Quickshell.Io
QtObject {
id: root
signal wokeFromSleep
property Process _monitor: Process {
running: true
command: ["gdbus", "monitor", "--system", "--dest", "org.freedesktop.login1", "--object-path", "/org/freedesktop/login1"]
stdout: SplitParser {
onRead: data => {
if (data.indexOf("PrepareForSleep") !== -1 && data.indexOf("false") !== -1)
root.wokeFromSleep();
}
}
}
}

View file

@ -13,6 +13,7 @@ singleton NiriIpc 1.0 NiriIpc.qml
singleton NotifService 1.0 NotifService.qml
singleton PowerProfileService 1.0 PowerProfileService.qml
singleton ScreenshotService 1.0 ScreenshotService.qml
singleton SleepService 1.0 SleepService.qml
singleton SystemStats 1.0 SystemStats.qml
singleton Theme 1.0 Theme.qml
singleton WeatherService 1.0 WeatherService.qml