From 42db065ac555175d1848809eba2c64a0d991f3c2 Mon Sep 17 00:00:00 2001 From: Kalle Carlbark Date: Wed, 4 Sep 2024 07:25:24 +0200 Subject: [PATCH] wip: color scheme --- src/main.zig | 149 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 142 insertions(+), 7 deletions(-) diff --git a/src/main.zig b/src/main.zig index 486df59..4d1c9b3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -87,6 +87,7 @@ pub fn main() !void { // }, // }, }); + // const logo_text_win = win.child(.{ .y_off = dims.rows }); var user_buf: [64]u8 = undefined; const user = try sys.get_user(&user_buf); var hostname_buf: [std.posix.HOST_NAME_MAX]u8 = undefined; @@ -105,7 +106,7 @@ pub fn main() !void { .y_off = 1, .x_off = dims.cols + 1, .width = .{ .limit = 40 }, - .height = .{ .limit = 6 }, + .height = .{ .limit = 10 }, .border = .{ .where = .{ .other = border_locations, @@ -151,7 +152,7 @@ pub fn main() !void { .text = " OS", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, @@ -161,7 +162,7 @@ pub fn main() !void { .text = " Kernel", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, @@ -171,7 +172,7 @@ pub fn main() !void { .text = " Uptime", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, @@ -181,7 +182,7 @@ pub fn main() !void { .text = " CPU", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, @@ -191,7 +192,7 @@ pub fn main() !void { .text = " Shell", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, @@ -201,14 +202,148 @@ pub fn main() !void { .text = " Terminal", .style = .{ .fg = .{ - .index = 2, + .index = 7, }, .bold = true, }, }, .{ .text = current_terminal }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 0, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 1, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 2, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 3, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 4, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 5, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 6, + }, + }, + }, + .{ + .text = " ▂▂▂\n", + .style = .{ + .fg = .{ + .index = 7, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 8, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 9, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 10, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 11, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 12, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 13, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 14, + }, + }, + }, + .{ + .text = " ▂▂▂", + .style = .{ + .fg = .{ + .index = 15, + }, + }, + }, }; + // const logo_text = [_]vaxis.Cell.Segment{ + // .{ + // .text = " hello", + // }, + // }; try koko.draw(logo_win, .{}); + // _ = try logo_text_win.print(&logo_text, .{}); // try root.kitty_image_inline_copy(allocator, tty.anyWriter(), "/Users/kc/Sync/Images/apple-dark.png"); result = try whoami_win.print(&whoami_info, .{ .wrap = .word });