initial commit

This commit is contained in:
Jeeves 2024-03-15 18:30:35 -06:00
commit 8bdf5f7d09
12 changed files with 496 additions and 0 deletions

30
src/module.zig Normal file
View file

@ -0,0 +1,30 @@
const std = @import("std");
pub const JSON = struct {
full_text: []const u8,
short_text: ?[]const u8 = null,
color: ?[]const u8 = null,
background: ?[]const u8 = null,
border: ?[]const u8 = null,
border_top: ?u16 = null,
border_right: ?u16 = null,
border_bottom: ?u16 = null,
border_left: ?u16 = null,
min_width: ?u16 = null,
@"align": ?[]const u8 = null,
name: ?[]const u8 = null,
instance: ?[]const u8 = null,
urgent: ?bool = null,
separator: ?bool = null,
separator_block_width: ?u16 = null,
markup: ?[]const u8 = null,
};
const Self = @This();
allocator: std.mem.Allocator,
getJsonFn: *const fn (*const Self) anyerror!JSON,
pub fn getJson(self: *const Self) anyerror!JSON {
return self.getJsonFn(self);
}