diff --git a/Modules/LockScreen/LockScreen.qml b/Modules/LockScreen/LockScreen.qml index 1376d31..c415d03 100644 --- a/Modules/LockScreen/LockScreen.qml +++ b/Modules/LockScreen/LockScreen.qml @@ -48,22 +48,6 @@ Loader { property string password: "" property bool pamAvailable: typeof PamContext !== "undefined" - // Process components for system commands - Process { - id: shutdownProcess - command: ["shutdown", "-h", "now"] - } - - Process { - id: rebootProcess - command: ["reboot"] - } - - Process { - id: logoutProcess - command: ["loginctl", "terminate-user", Quickshell.env("USER")] - } - function unlockAttempt() { Logger.log("LockScreen", "Unlock attempt started") @@ -932,7 +916,7 @@ Loader { hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { - shutdownProcess.running = true + CompositorService.shutdown() } } @@ -986,7 +970,7 @@ Loader { hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { - rebootProcess.running = true + CompositorService.reboot() } } @@ -1040,7 +1024,7 @@ Loader { hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { - logoutProcess.running = true + CompositorService.logout() } } diff --git a/Modules/Toast/ToastManager.qml b/Modules/Toast/ToastManager.qml index 8bb8706..0da45c1 100644 --- a/Modules/Toast/ToastManager.qml +++ b/Modules/Toast/ToastManager.qml @@ -19,7 +19,7 @@ Variants { // Only show on screens that have notifications enabled visible: modelData ? (Settings.data.notifications.monitors.includes(modelData.name) - || (Settings.data.notifications.monitors.length === 0)) : false + || (Settings.data.notifications.monitors.length === 0)) : false // Position based on bar location, like Notification popup does anchors { @@ -57,7 +57,7 @@ Variants { Component.onCompleted: { // Only register toasts for screens that have notifications enabled if (modelData ? (Settings.data.notifications.monitors.includes(modelData.name) - || (Settings.data.notifications.monitors.length === 0)) : false) { + || (Settings.data.notifications.monitors.length === 0)) : false) { // Register this toast with the service ToastService.allToasts.push(toast) diff --git a/Services/ToastService.qml b/Services/ToastService.qml index 38ce2db..5db7139 100644 --- a/Services/ToastService.qml +++ b/Services/ToastService.qml @@ -211,7 +211,7 @@ Singleton { break } } - + if (allDismissed) { isShowingToast = false