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) {