From 1d509282f7e551de5d615eb21c35fb2d36af6185 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 30 Sep 2025 15:29:19 +0200 Subject: [PATCH] feat: add cli options to select color scheme --- src/main.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.zig b/src/main.zig index 60730e5..98e74f6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -83,6 +83,8 @@ pub fn main() anyerror!void { .literal = "Disable :LINE and +LINE syntax", .scratch = "Open a scratch (temporary) buffer on start", .new_file = "Create a new untitled file on start", + .dark = "Use dark color scheme", + .light = "Use light color scheme", .version = "Show build version and exit", }; @@ -121,6 +123,8 @@ pub fn main() anyerror!void { literal: bool, scratch: bool, new_file: bool, + dark: bool, + light: bool, version: bool, positional: struct { @@ -346,6 +350,11 @@ pub fn main() anyerror!void { try tui_proc.send(.{ "cmd", "create_scratch_buffer", .{} }); } + if (args.dark) + try tui_proc.send(.{ "cmd", "force_color_scheme", .{"dark"} }) + else if (args.light) + try tui_proc.send(.{ "cmd", "force_color_scheme", .{"light"} }); + if (args.exec) |exec_str| { var cmds = std.mem.splitScalar(u8, exec_str, ';'); while (cmds.next()) |cmd| {