refactor: clean-up flow logo rendering

This commit is contained in:
CJ van den Berg 2024-08-21 21:54:35 +02:00
parent b831d99d1c
commit 08e06bc8dd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
7 changed files with 35 additions and 13 deletions

View file

@ -31,7 +31,7 @@ pub fn create(a: Allocator) !tui.Mode {
};
return .{
.handler = EventHandler.to_owned(self),
.name = root.application_logo ++ root.application_name,
.name = root.application_name,
.description = "default",
.keybind_hints = &hints,
};

View file

@ -23,7 +23,7 @@ pub fn create(a: std.mem.Allocator) !tui.Mode {
};
return .{
.handler = EventHandler.to_owned(self),
.name = root.application_logo ++ root.application_name,
.name = root.application_name,
.description = "home",
.keybind_hints = &hints,
};

View file

@ -1,5 +1,4 @@
const tp = @import("thespian");
const root = @import("root");
const key = @import("renderer").input.key;
const mod = @import("renderer").input.modifier;
@ -33,7 +32,7 @@ pub fn create(a: Allocator) !tui.Mode {
try self.commands.init(self);
return .{
.handler = EventHandler.to_owned(self),
.name = root.application_logo ++ "INSERT",
.name = "INSERT",
.description = "vim",
.line_numbers = if (tui.current().config.vim_insert_gutter_line_numbers_relative) .relative else .absolute,
};

View file

@ -1,5 +1,4 @@
const tp = @import("thespian");
const root = @import("root");
const key = @import("renderer").input.key;
const mod = @import("renderer").input.modifier;
@ -34,7 +33,7 @@ pub fn create(a: Allocator) !tui.Mode {
try self.commands.init(self);
return .{
.handler = EventHandler.to_owned(self),
.name = root.application_logo ++ "NORMAL",
.name = "NORMAL",
.description = "vim",
.line_numbers = if (tui.current().config.vim_normal_gutter_line_numbers_relative) .relative else .absolute,
.keybind_hints = &hints,

View file

@ -1,5 +1,4 @@
const tp = @import("thespian");
const root = @import("root");
const key = @import("renderer").input.key;
const mod = @import("renderer").input.modifier;
@ -34,7 +33,7 @@ pub fn create(a: Allocator) !tui.Mode {
try self.commands.init(self);
return .{
.handler = EventHandler.to_owned(self),
.name = root.application_logo ++ "VISUAL",
.name = "VISUAL",
.description = "vim",
.line_numbers = if (tui.current().config.vim_visual_gutter_line_numbers_relative) .relative else .absolute,
.keybind_hints = &hints,