From b2b5b31df357b82fc15e3ac5fae8c6506499e6ee Mon Sep 17 00:00:00 2001 From: samposa_1337 Date: Thu, 12 Nov 2026 15:06:58 +0300 Subject: add de/wm --- src/main.zig | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index fb35199..99bcdcd 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4,28 +4,30 @@ const st = @import("stat.zig"); const artd = @import("art.zig"); pub fn main(init: std.process.Init) !void { const allocator = init.arena.allocator(); - const ke = try st.getkernel(init.io ,allocator); - const cpu = try st.getcpu(init.io ,allocator); - const osg = try st.getos(init.io ,allocator); - const ram = try st.getram(init.io ,allocator); - const ramq = try st.gettotal(init.io ,allocator); - const uptime = try st.uptime(init.io ,allocator); - const user = try st.getuser(init.environ_map ,allocator); - const shell = try st.getshell(init.environ_map ,allocator); + const ke = try st.getkernel(init.io, allocator); + const cpu = try st.getcpu(init.io, allocator); + const osg = try st.getos(init.io, allocator); + const ram = try st.getram(init.io, allocator); + const ramq = try st.gettotal(init.io, allocator); + const uptime = try st.uptime(init.io, allocator); + const user = try st.getuser(init.environ_map, allocator); + const shell = try st.getshell(init.environ_map, allocator); + const wm = try st.getwm(init.environ_map, allocator); - const hostname = try st.gethostname(init.io ,allocator); - var bufs: [1024]u8 = undefined; - var stdw = Io.File.stdout().writer(init.io, &bufs); - const stdout = &stdw.interface; - const art = artd.logo; - try stdout.print(" Ezfetch\n", .{}); - try stdout.print("{s} -----------------\n", .{art[0]}); - try stdout.print("{s} Os: {s}\n", .{art[1],osg}); - try stdout.print("{s} Username@hostname: {s}@{s}\n", .{art[2],user,hostname}); - try stdout.print("{s} Kernel: {s}\n", .{art[3],ke}); - try stdout.print("{s} Cpu: {s}\n", .{art[4],cpu}); - try stdout.print("{s} Ram: {s} / {s} \n", .{art[5],ramq,ram}); - try stdout.print(" larptime: {s}\n", .{uptime}); - try stdout.print(" shell: {s}\n", .{shell}); - try stdout.flush(); + const hostname = try st.gethostname(init.io, allocator); + var bufs: [1024]u8 = undefined; + var stdw = Io.File.stdout().writer(init.io, &bufs); + const stdout = &stdw.interface; + const art = artd.logo; + try stdout.print(" Ezfetch\n", .{}); + try stdout.print(" -----------------\n", .{}); + try stdout.print("{s} Os: {s}\n", .{ art[0], osg }); + try stdout.print("{s} Username@hostname: {s}@{s}\n", .{ art[1], user, hostname }); + try stdout.print("{s} Kernel: {s}\n", .{ art[2], ke }); + try stdout.print("{s} Cpu: {s}\n", .{ art[3], cpu }); + try stdout.print("{s} Ram: {s} / {s} \n", .{ art[4], ramq, ram }); + try stdout.print("{s} DE/WM: {s}\n", .{ art[5], wm }); + try stdout.print(" larptime: {s}\n", .{uptime}); + try stdout.print(" shell: {s}\n", .{shell}); + try stdout.flush(); } -- cgit v1.3