summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorsamposa_1337 <lososhome1@gmail.com>2026-10-28 01:38:40 +0300
committersamposa_1337 <lososhome1@gmail.com>2026-10-28 01:38:40 +0300
commit9b594927f9c8ef1cfc3f2aff2fc866f387bfbefd (patch)
treefeaccf70ff54287c9cc06f7297fab8f1d48bb20b /src/main.zig
first commit
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
new file mode 100644
index 0000000..adfd07f
--- /dev/null
+++ b/src/main.zig
@@ -0,0 +1,26 @@
+const std = @import("std");
+const stat = @import("stat.zig");
+const artd = @import("art.zig");
+
+pub fn main() !void {
+ const stdout = std.io.getStdOut().writer();
+ var gpa = std.heap.GeneralPurposeAllocator(.{}){};
+ defer _ = gpa.deinit();
+ const allocator = gpa.allocator();
+
+ const cpuq = try stat.getcput(allocator);
+ const kernel = try stat.getkernel(allocator);
+ const osd = try stat.getos(allocator);
+ const ram = try stat.ramInfo(allocator);
+ defer allocator.free(ram);
+ defer allocator.free(osd);
+ defer allocator.free(cpuq);
+ defer allocator.free(kernel);
+ 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} Kernel: {s}\n", .{art[3], kernel});
+ try stdout.print("{s} Cpu: {s}\n", .{art[4], cpuq});
+ try stdout.print("{s} Ram: {s}\n", .{art[5], ram});
+}