feat: add config options to disable scrollbars and/or file icons

This commit is contained in:
CJ van den Berg 2025-03-06 17:11:49 +01:00
parent e70972f357
commit a5bf57e0e6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
8 changed files with 26 additions and 11 deletions

View file

@ -131,7 +131,7 @@ fn render_mini_mode(plane: *Plane, theme: *const Widget.Theme) void {
fn render_normal(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
plane.on_styles(style.italic);
_ = plane.putstr(" ") catch {};
if (self.file_icon.len > 0) {
if (self.file_icon.len > 0 and tui.config().show_fileicons) {
self.render_file_icon(plane, theme);
_ = plane.print(" ", .{}) catch {};
}
@ -143,7 +143,7 @@ fn render_normal(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
fn render_detailed(self: *Self, plane: *Plane, theme: *const Widget.Theme) void {
plane.on_styles(style.italic);
_ = plane.putstr(" ") catch {};
if (self.file_icon.len > 0) {
if (self.file_icon.len > 0 and tui.config().show_fileicons) {
self.render_file_icon(plane, theme);
_ = plane.print(" ", .{}) catch {};
}