feat: launcher light/dark commands

This commit is contained in:
2 * r + 2 * t 2025-05-07 18:23:48 +10:00
parent 9b958a8e10
commit f4ffaf9d71
2 changed files with 12 additions and 2 deletions

View file

@ -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 {

View file

@ -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