feat: add disk info

This commit is contained in:
utox39 committed 2025-03-09 21:22:20 +01:00
1 parent 3506e0db7f
commit 613d3f503d
1 file changed
+4
+4
View File
@@ -41,4 +41,8 @@ pub fn main() !void {
const ram_info = try os_module.getRamInfo(); const ram_info = try os_module.getRamInfo();
try stdout.print("ram: {d:.2} / {d:.2} GB ({}%)\n", .{ ram_info.ram_usage, ram_info.ram_size, ram_info.ram_usage_percentage }); try stdout.print("ram: {d:.2} / {d:.2} GB ({}%)\n", .{ ram_info.ram_usage, ram_info.ram_size, ram_info.ram_usage_percentage });
try bw.flush(); try bw.flush();
const diskInfo = try os_module.getDiskSize("/");
try stdout.print("disk ({s}): {d:.2} / {d:.2} GB ({}%)\n", .{ diskInfo.disk_path, diskInfo.disk_usage, diskInfo.disk_size, diskInfo.disk_usage_percentage });
try bw.flush();
} }