diff options
| -rw-r--r-- | modules/launcher/Actions.qml | 5 | ||||
| -rw-r--r-- | services/Colours.qml | 9 |
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 |