diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 15:59:09 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 15:59:09 +1000 |
| commit | f14d00d3dcab45e1f1b158b71b1a7111551b88a8 (patch) | |
| tree | 803f94d3e54b26d11966e436ad7f97a7eb0bca17 /modules/launcher | |
| parent | feat: impl scheme launcher action (diff) | |
| download | caelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.tar.gz caelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.tar.bz2 caelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.zip | |
internal: use execDetached
Diffstat (limited to 'modules/launcher')
| -rw-r--r-- | modules/launcher/Actions.qml | 40 | ||||
| -rw-r--r-- | modules/launcher/Schemes.qml | 2 |
2 files changed, 6 insertions, 36 deletions
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 diff --git a/modules/launcher/Schemes.qml b/modules/launcher/Schemes.qml index 3bdc90a..b81dbe4 100644 --- a/modules/launcher/Schemes.qml +++ b/modules/launcher/Schemes.qml @@ -60,8 +60,8 @@ Singleton { readonly property var colours: modelData.colours function onClicked(list: AppList): void { - Quickshell.execDetached(["caelestia", "scheme", "set", "-n", name, "-f", flavour]); list.visibilities.launcher = false; + Quickshell.execDetached(["caelestia", "scheme", "set", "-n", name, "-f", flavour]); } } } |