diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index dbed511..bf3abdc 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -28,6 +28,7 @@ ["f9", "theme_prev"], ["f10", "theme_next"], ["f11", "toggle_panel"], + ["alt+f11", "toggle_color_scheme"], ["f12", "toggle_inputview"], ["alt+!", "run_task"], ["ctrl+1", "add_task"], diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 5785311..db3c6b1 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -908,6 +908,15 @@ const cmds = struct { } pub const toggle_highlight_columns_meta: Meta = .{ .description = "Toggle highlight columns" }; + pub fn toggle_color_scheme(self: *Self, _: Ctx) Result { + self.color_scheme = switch (self.color_scheme) { + .dark => .light, + .light => .dark, + }; + self.logger.print("color scheme: {s}", .{@tagName(self.color_scheme)}); + } + pub const toggle_color_scheme_meta: Meta = .{ .description = "Toggle dark/light color scheme" }; + pub fn toggle_input_mode(self: *Self, _: Ctx) Result { var it = std.mem.splitScalar(u8, self.config_.input_mode, '/'); self.config_.input_mode = it.first();