From 989b5b23058d51be7f4c362ced7903a95ba9d707 Mon Sep 17 00:00:00 2001 From: utox39 Date: Fri, 12 Sep 2025 02:30:18 +0200 Subject: [PATCH 1/4] feat(ascii): handle the IoctlFailed error using default values --- src/ascii.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ascii.zig b/src/ascii.zig index 29848b3..2b285cc 100644 --- a/src/ascii.zig +++ b/src/ascii.zig @@ -95,7 +95,7 @@ pub fn printAsciiAndModules(allocator: std.mem.Allocator, ascii_art_path: ?[]u8, const ascii_art_items = ascii_art_content_list.items; const sys_info_items = sys_info_list.items; - const terminal_size = try utils.getTerminalSize(); + const terminal_size = try utils.getTerminalSize() catch utils.TermSize{ 50, 50 }; const terminal_width: usize = @intCast(terminal_size.width); const spacing: usize = 5; From 6317269c4fef303cb87040fb41e3db6d93bb766b Mon Sep 17 00:00:00 2001 From: utox39 Date: Fri, 12 Sep 2025 02:31:31 +0200 Subject: [PATCH 2/4] test(utils): handle IoctlFailed error using default values --- src/utils.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.zig b/src/utils.zig index 53b45b3..aab6816 100644 --- a/src/utils.zig +++ b/src/utils.zig @@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize { } test "getTerminalSize" { - const terminal_size = try getTerminalSize(); + const terminal_size = try getTerminalSize() catch TermSize{ 50, 50 }; std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width }); From 837b7cd5c42ff6c28a8122cacd0e0f0ea817952a Mon Sep 17 00:00:00 2001 From: utox39 Date: Fri, 12 Sep 2025 02:34:02 +0200 Subject: [PATCH 3/4] build: bump version to 0.21.1 --- build.zig.zon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig.zon b/build.zig.zon index e96d9ec..e00987f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -10,7 +10,7 @@ // This is a [Semantic Version](https://semver.org/). // In a future version of Zig it will be used for package deduplication. - .version = "0.21.0", + .version = "0.21.1", // Together with name, this represents a globally unique package // identifier. This field is generated by the Zig toolchain when the From 2b32119bc750b99ccebc4db71adb75d4aac1d276 Mon Sep 17 00:00:00 2001 From: utox39 Date: Fri, 12 Sep 2025 02:41:20 +0200 Subject: [PATCH 4/4] fix: minor fix --- src/ascii.zig | 2 +- src/utils.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ascii.zig b/src/ascii.zig index 2b285cc..c24fc50 100644 --- a/src/ascii.zig +++ b/src/ascii.zig @@ -95,7 +95,7 @@ pub fn printAsciiAndModules(allocator: std.mem.Allocator, ascii_art_path: ?[]u8, const ascii_art_items = ascii_art_content_list.items; const sys_info_items = sys_info_list.items; - const terminal_size = try utils.getTerminalSize() catch utils.TermSize{ 50, 50 }; + const terminal_size = utils.getTerminalSize() catch utils.TermSize{ .height = 50, .width = 50 }; const terminal_width: usize = @intCast(terminal_size.width); const spacing: usize = 5; diff --git a/src/utils.zig b/src/utils.zig index aab6816..b9b455b 100644 --- a/src/utils.zig +++ b/src/utils.zig @@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize { } test "getTerminalSize" { - const terminal_size = try getTerminalSize() catch TermSize{ 50, 50 }; + const terminal_size = getTerminalSize() catch TermSize{ .height = 50, .width = 50 }; std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width });