summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-07 18:23:48 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-07 18:23:48 +1000
commitf4ffaf9d71aacee33964f3632900a70cf1151fc0 (patch)
tree8d952de8c3fdc72a3053f5e8a0b30f4551cfc1fa
parentlauncher: better fuzzy query (diff)
downloadcaelestia-shell-f4ffaf9d71aacee33964f3632900a70cf1151fc0.tar.gz
caelestia-shell-f4ffaf9d71aacee33964f3632900a70cf1151fc0.tar.bz2
caelestia-shell-f4ffaf9d71aacee33964f3632900a70cf1151fc0.zip
feat: launcher light/dark commands
-rw-r--r--modules/launcher/Actions.qml5
-rw-r--r--services/Colours.qml9
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/launcher/Actions.qml b/modules/launcher/Actions.qml
index e604ae3..8677154 100644
--- a/modules/launcher/Actions.qml
+++ b/modules/launcher/Actions.qml
@@ -1,6 +1,7 @@
pragma Singleton
import "root:/utils/scripts/fuzzysort.js" as Fuzzy
+import "root:/services"
import "root:/config"
import Quickshell
import Quickshell.Io
@@ -53,7 +54,7 @@ Singleton {
function onClicked(list: AppList): void {
list.launcher.launcherVisible = false;
- // TODO
+ Colours.setMode("light");
}
},
Action {
@@ -63,7 +64,7 @@ Singleton {
function onClicked(list: AppList): void {
list.launcher.launcherVisible = false;
- // TODO
+ Colours.setMode("dark");
}
},
Action {
diff --git a/services/Colours.qml b/services/Colours.qml
index fd0d1f6..dfd2870 100644
--- a/services/Colours.qml
+++ b/services/Colours.qml
@@ -44,6 +44,15 @@ Singleton {
}
}
+ function setMode(mode: string): void {
+ setModeProc.command = ["caelestia", "scheme", "dynamic", "default", mode];
+ setModeProc.startDetached();
+ }
+
+ Process {
+ id: setModeProc
+ }
+
FileView {
path: `${StandardPaths.standardLocations(StandardPaths.GenericStateLocation)[0]}/caelestia/scheme/current-mode.txt`
watchChanges: true