launcher: scheme subcommand

This commit is contained in:
2 * r + 2 * t 2025-01-26 17:13:12 +11:00
parent fe930504a4
commit 91b53bfbbb

View file

@ -473,6 +473,22 @@ const Results = ({ entry, mode }: { entry: Widget.Entry; mode: Variable<Mode> })
description: "Manage open windows",
command: () => mode.set("windows"),
},
scheme: {
icon: "palette",
name: "Scheme",
description: "Change the current colour scheme",
command: (...args) => {
// If no args, autocomplete cmd
if (args.length === 0) {
entry.set_text(">scheme ");
entry.set_position(-1);
return true;
}
execAsync(`caelestia scheme ${args[0]}`).catch(console.error);
close(self);
},
},
todo: {
icon: "checklist",
name: "Todo",