From a9f4d4941a9f30e3d83ae7fcb948f9d616b82f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B9=D8=A8=D8=AF=20=D8=A7=D9=84=D8=B1=D8=AD=D9=85=D9=86?= =?UTF-8?q?=20=D8=B5=D8=A8=D8=A7=D9=87=D9=8A?= Date: Fri, 19 Sep 2025 00:26:05 +0300 Subject: [PATCH] slightly improve logs --- src/apprt/action.zig | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/apprt/action.zig b/src/apprt/action.zig index fbcc92805..b7dc80e03 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -569,6 +569,15 @@ pub const SetTitle = struct { .title = self.title.ptr, }; } + + pub fn format( + value: @This(), + comptime _: []const u8, + _: std.fmt.FormatOptions, + writer: anytype, + ) !void { + try writer.print("{s}{{ {s} }}", .{ @typeName(@This()), value.title }); + } }; pub const Pwd = struct { @@ -584,6 +593,15 @@ pub const Pwd = struct { .pwd = self.pwd.ptr, }; } + + pub fn format( + value: @This(), + comptime _: []const u8, + _: std.fmt.FormatOptions, + writer: anytype, + ) !void { + try writer.print("{s}{{ {s} }}", .{ @typeName(@This()), value.pwd }); + } }; /// The desktop notification to show. @@ -603,6 +621,19 @@ pub const DesktopNotification = struct { .body = self.body.ptr, }; } + + pub fn format( + value: @This(), + comptime _: []const u8, + _: std.fmt.FormatOptions, + writer: anytype, + ) !void { + try writer.print("{s}{{ title: {s}, body: {s} }}", .{ + @typeName(@This()), + value.title, + value.body, + }); + } }; pub const KeySequence = union(enum) {