feat(config): migrate to a simpler config file format

This commit is contained in:
CJ van den Berg 2025-01-08 22:14:29 +01:00
parent 4f5eb15392
commit caeb3fc338
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 94 additions and 14 deletions

View file

@ -379,13 +379,13 @@ const cmds = struct {
pub fn open_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@import("config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name[0 .. file_name.len - 5] } });
}
pub const open_config_meta = .{ .description = "Edit configuration file" };
pub fn open_gui_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@import("gui_config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name[0 .. file_name.len - 5] } });
}
pub const open_gui_config_meta = .{ .description = "Edit gui configuration file" };