summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-17 15:59:09 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-17 15:59:09 +1000
commitf14d00d3dcab45e1f1b158b71b1a7111551b88a8 (patch)
tree803f94d3e54b26d11966e436ad7f97a7eb0bca17
parentfeat: impl scheme launcher action (diff)
downloadcaelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.tar.gz
caelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.tar.bz2
caelestia-shell-f14d00d3dcab45e1f1b158b71b1a7111551b88a8.zip
internal: use execDetached
-rw-r--r--modules/launcher/Actions.qml40
-rw-r--r--modules/launcher/Schemes.qml2
-rw-r--r--services/Colours.qml7
3 files changed, 7 insertions, 42 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]);
}
}
}
diff --git a/services/Colours.qml b/services/Colours.qml
index 724a76e..20fb6aa 100644
--- a/services/Colours.qml
+++ b/services/Colours.qml
@@ -53,12 +53,7 @@ Singleton {
}
function setMode(mode: string): void {
- setModeProc.command = ["caelestia", "scheme", "set", "--notify", "-m", mode];
- setModeProc.startDetached();
- }
-
- Process {
- id: setModeProc
+ Quickshell.execDetached(["caelestia", "scheme", "set", "--notify", "-m", mode]);
}
FileView {