feat: add command toggle_color_scheme and flow mode keybind (alt+f11)
This commit is contained in:
parent
fbe6a6e5ea
commit
cb389888e5
2 changed files with 10 additions and 0 deletions
|
@ -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"],
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue