feat(win32 gui): add gui_config.json config file
This commit is contained in:
parent
6d7a316abb
commit
eaa7ad87b7
6 changed files with 40 additions and 21 deletions
|
@ -378,7 +378,7 @@ const cmds = struct {
|
|||
pub const open_help_meta = .{ .description = "Open help" };
|
||||
|
||||
pub fn open_config(_: *Self, _: Ctx) Result {
|
||||
const file_name = try root.get_config_file_name();
|
||||
const file_name = try root.get_config_file_name(@TypeOf(tui.current().config));
|
||||
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
|
||||
}
|
||||
pub const open_config_meta = .{ .description = "Edit configuration file" };
|
||||
|
|
|
@ -83,7 +83,7 @@ fn start(args: StartArgs) tp.result {
|
|||
fn init(allocator: Allocator) !*Self {
|
||||
var self = try allocator.create(Self);
|
||||
|
||||
var conf, const conf_bufs = root.read_config(allocator);
|
||||
var conf, const conf_bufs = root.read_config(config, allocator);
|
||||
defer root.free_config(allocator, conf_bufs);
|
||||
|
||||
const theme = get_theme_by_name(conf.theme) orelse get_theme_by_name("dark_modern") orelse return tp.exit("unknown theme");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue