slightly improve logs

This commit is contained in:
عبد الرحمن صباهي
2025-09-19 00:26:05 +03:00
parent 2ebef2650c
commit d6e58ef1fc

View File

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