From 6d839bc2e5d70c064d4aa2ef3a3f937c88d97a57 Mon Sep 17 00:00:00 2001 From: samposa_1337 Date: Fri, 30 Oct 2026 20:41:21 +0300 Subject: add shell --- src/main.zig | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 26b54f1..6080a47 100644 --- a/src/main.zig +++ b/src/main.zig @@ -10,6 +10,8 @@ pub fn main() !void { defer _ = gpa.deinit(); const allocator = gpa.allocator(); const cpuq = try stat.getcput(allocator); + const shell = try stat.shellenv(allocator); + defer allocator.free(shell); defer allocator.free(cpuq); const kernel = try stat.getkernel(allocator); defer allocator.free(kernel); @@ -26,12 +28,13 @@ pub fn main() !void { const trm = try stat.uptime(allocator); defer allocator.free(trm); const art = artd.logo; - try stdout.print("{s} Ezfetch\n", .{art[0]}); - try stdout.print("{s} -----------------\n", .{art[1]}); - try stdout.print("{s} Os: {s}\n", .{ art[2], osd }); - try stdout.print("{s} User@hostname: {s}@{s}\n", .{ art[3], user, hst }); - try stdout.print("{s} Kernel: {s}\n", .{ art[4], kernel }); - try stdout.print("{s} Cpu: {s}\n", .{ art[5], cpuq }); - try stdout.print(" Ram: {s} / {s}\n", .{ ge, ram }); + try stdout.print(" Ezfetch\n", .{}); + try stdout.print("{s} -----------------\n", .{art[0]}); + try stdout.print("{s} Os: {s}\n", .{ art[1], osd }); + try stdout.print("{s} User@hostname: {s}@{s}\n", .{ art[2], user, hst }); + try stdout.print("{s} Kernel: {s}\n", .{ art[3], kernel }); + try stdout.print("{s} Cpu: {s}\n", .{ art[4], cpuq }); + try stdout.print("{s} Ram: {s} / {s}\n", .{ art[5], ge, ram }); try stdout.print(" larptime: {s}\n", .{trm}); + try stdout.print(" shell: {s}\n", .{shell}); } -- cgit v1.3