From badf7aba844967c5d13e01079c12df758715167a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 27 Sep 2026 12:37:52 +0200 Subject: ... --- accounts/gkleen@skadhi/shell/quickshell/Lockscreen.qml | 2 +- accounts/gkleen@skadhi/shell/quickshell/NiriIdle.qml | 2 +- accounts/gkleen@skadhi/shell/quickshell/UnixIPC.qml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'accounts/gkleen@skadhi/shell/quickshell') diff --git a/accounts/gkleen@skadhi/shell/quickshell/Lockscreen.qml b/accounts/gkleen@skadhi/shell/quickshell/Lockscreen.qml index 0b4a68b2..373692df 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/Lockscreen.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/Lockscreen.qml @@ -33,7 +33,7 @@ Scope { Connections { target: Custom.Systemd - function onSleep(before: bool) { + function onPrepareForSleep(before: bool) { console.log(`received prepare for sleep ${before}`); if (before) { lock.locked = true; diff --git a/accounts/gkleen@skadhi/shell/quickshell/NiriIdle.qml b/accounts/gkleen@skadhi/shell/quickshell/NiriIdle.qml index beff205c..fb1cfa4d 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/NiriIdle.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/NiriIdle.qml @@ -22,7 +22,7 @@ Scope { } Connections { target: Custom.Systemd - function onSleep(before: bool) { + function onPrepareForSleep(before: bool) { if (!before) NiriService.sendCommand({ "Action": { "PowerOnMonitors": {} } }, _ => {}); } diff --git a/accounts/gkleen@skadhi/shell/quickshell/UnixIPC.qml b/accounts/gkleen@skadhi/shell/quickshell/UnixIPC.qml index 3d950031..483a60c6 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/UnixIPC.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/UnixIPC.qml @@ -31,6 +31,8 @@ Scope { root.onCommandBrightness(command.Brightness); else if (command.LockSession) Custom.Systemd.lockSession(); + else if (command.Sleep) + Custom.Systemd.sleep(); else if (command.Suspend) Custom.Systemd.suspend(); else if (command.Hibernate) -- cgit v1.2.3