From 900ece804c6fbaceb3bb2146cb91f53163a10867 Mon Sep 17 00:00:00 2001 From: LemonAniLabs <6212976+LemonAniLabs@users.noreply.github.com> Date: Thu, 11 Jun 2026 12:02:50 +0800 Subject: [PATCH] Use LogoutPrompt for Restart/Shut Down/Log Out; drop invalid width binding Restart and Shut Down ran `/sbin/reboot` and `/sbin/shutdown now` directly. On systemd setups these need elevated privileges, so for an unprivileged user they silently do nothing; where they do run they act immediately with no confirmation, even though the entries are labelled "Restart..."/"Shut Down..." and emulate the macOS Apple menu, which always confirms. Route Restart, Shut Down and (for consistency) Log Out through the org.kde.LogoutPrompt D-Bus interface, which shows Plasma's standard confirmation dialog and needs no elevated privileges. Also remove an invalid `width: parent` binding on the System Preferences delegate (an Item was assigned to the real-typed `width`); width is already handled by Layout.fillWidth. Co-Authored-By: Claude Opus 4.8 (1M context) --- package/contents/config/main.xml | 6 +++--- package/contents/ui/main.qml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index 1877254..fee745d 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -35,16 +35,16 @@ SPDX-License-Identifier: GPL-2.0-or-later systemctl suspend - /sbin/reboot + qdbus6 org.kde.LogoutPrompt /LogoutPrompt promptReboot - /sbin/shutdown now + qdbus6 org.kde.LogoutPrompt /LogoutPrompt promptShutDown qdbus6 org.freedesktop.ScreenSaver /ScreenSaver Lock - qdbus6 org.kde.Shutdown /Shutdown logout + qdbus6 org.kde.LogoutPrompt /LogoutPrompt promptLogout diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 26f0504..32ed861 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -145,7 +145,6 @@ PlasmoidItem { ListDelegate { id: systemPreferencesItem highlight: delegateHighlight - width: parent text: i18n("System Preferences...") onClicked: { executable.exec(systemPreferencesCMD); // cmd exec