This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nova-shell/shell/services/SleepService.qml

22 lines
526 B
QML

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();
}
}
}
}