feat: add status bar widget parameter support with parameters for linenumber and spacer widgets

linenumber widgets may have three parameters: pad width (int), pad value (space/zero) and
digit style (ascii/digital/subscript/superscript). eg `5,zero,digital`

spacers may have one parameter: width (int)
This commit is contained in:
CJ van den Berg 2025-03-25 20:50:11 +01:00
parent 0e72a714dc
commit aa568dfd5e
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
14 changed files with 80 additions and 18 deletions

View file

@ -29,7 +29,7 @@ const Self = @This();
const idle_msg = "🐶";
pub const width = idle_msg.len + 20;
pub fn create(allocator: Allocator, parent: Plane, _: ?EventHandler) @import("widget.zig").CreateError!Widget {
pub fn create(allocator: Allocator, parent: Plane, _: ?EventHandler, _: ?[]const u8) @import("widget.zig").CreateError!Widget {
const frame_rate = tp.env.get().num("frame-rate");
const self: *Self = try allocator.create(Self);
self.* = .{