From f14d00d3dcab45e1f1b158b71b1a7111551b88a8 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:59:09 +1000 Subject: internal: use execDetached --- modules/launcher/Actions.qml | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) (limited to 'modules/launcher/Actions.qml') diff --git a/modules/launcher/Actions.qml b/modules/launcher/Actions.qml index 4cb3a31..9f6f52c 100644 --- a/modules/launcher/Actions.qml +++ b/modules/launcher/Actions.qml @@ -75,7 +75,7 @@ Singleton { function onClicked(list: AppList): void { list.visibilities.launcher = false; - shutdown.running = true; + Quickshell.execDetached(["systemctl", "poweroff"]); } }, Action { @@ -86,7 +86,7 @@ Singleton { function onClicked(list: AppList): void { list.visibilities.launcher = false; - reboot.running = true; + Quickshell.execDetached(["systemctl", "reboot"]); } }, Action { @@ -97,7 +97,7 @@ Singleton { function onClicked(list: AppList): void { list.visibilities.launcher = false; - logout.running = true; + Quickshell.execDetached(["sh", "-c", "(uwsm stop | grep -q 'Compositor is not running' && loginctl terminate-user $USER) || uwsm stop"]); } }, Action { @@ -107,7 +107,7 @@ Singleton { function onClicked(list: AppList): void { list.visibilities.launcher = false; - lock.running = true; + Quickshell.execDetached(["loginctl", "lock-session"]); } }, Action { @@ -117,7 +117,7 @@ Singleton { function onClicked(list: AppList): void { list.visibilities.launcher = false; - sleep.running = true; + Quickshell.execDetached(["systemctl", "suspend-then-hibernate"]); } } ] @@ -140,36 +140,6 @@ Singleton { list.search.text = `${Config.launcher.actionPrefix}${text} `; } - Process { - id: shutdown - - command: ["systemctl", "poweroff"] - } - - Process { - id: reboot - - command: ["systemctl", "reboot"] - } - - Process { - id: logout - - command: ["sh", "-c", "(uwsm stop | grep -q 'Compositor is not running' && loginctl terminate-user $USER) || uwsm stop"] - } - - Process { - id: lock - - command: ["loginctl", "lock-session"] - } - - Process { - id: sleep - - command: ["systemctl", "suspend-then-hibernate"] - } - component Action: QtObject { required property string name required property string desc -- cgit v1.2.3-freya